code: def new_instance(cls, classname):
          
          try:
              return javabridge.static_call(
                  "Lweka/core/Utils;", "forName",
                  "(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Object;",
                  javabridge.class_for_name("java.lang.Object"), classname, [])
          except JavaException as e:
              print("Failed to instantiate " + classname + ": " + str(e))
              return None
docs: Creates a new object from the given classname using the default constructor, None in case of error.
  
          :param classname: the classname in Java notation (eg "weka.core.DenseInstance")
          :type classname: str
          :return: the Java object
          :rtype: JB_Object