title: Weka python wrapper Loader
body: <p>I've installed weka python wrapper on Mc Os X 10.9.4. And I tried running the sample code:</p>
  
  <pre><code>import weka.core.jvm as jvm
  jvm.start()
  
  from weka.core.converters import Loader
  l = Loader("weka.core.converters.ArffLoader")
  d = l.load_file("X.arff")
  
  d.set_class_index(d.num_attributes() - 1)
  print(d)
  </code></pre>
  
  <p>and I receive the following error:</p>
  
  <pre><code>Failed to get class weka/core/converters/ArffLoader
  Exception in thread "Thread-2" java.lang.NoClassDefFoundError: weka/core/converters/ArffLoader
  Failed to instantiate weka.core.converters.ArffLoader/weka/core/converters/ArffLoader: weka/core/converters/ArffLoader
  Caused by: java.lang.ClassNotFoundException: weka.core.converters.ArffLoader
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
  Traceback (most recent call last):
    File "/Users/hani/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2883, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "&lt;ipython-input-5-d835d9d560d2&gt;", line 2, in &lt;module&gt;
      l = Loader("weka.core.converters.ArffLoader")
    File "/Users/hani/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/python_weka_wrapper-0.1.10-py2.7.egg/weka/core/converters.py", line 40, in __init__
      self.enforce_type(jobject, "weka.core.converters.Loader")
    File "/Users/hani/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/python_weka_wrapper-0.1.10-py2.7.egg/weka/core/classes.py", line 113, in enforce_type
      raise TypeError("Object does not implement or subclass " + intf_or_class + "!")
  TypeError: Object does not implement or subclass weka.core.converters.Loader!
  </code></pre>
  
  <p>After some tinkering I realized that setting the working directory to the python-weka-wrapper folder using os.chdir remedies the problem in some environments but not all of them (e.g. pycharm is not fixed using this trick). Any ideas how I can fix this issue?</p>