title: How to add classifier to weka?
body: <p>I want to add custom classifier to Weka. This classifier is in jar file. I've put it into the Weka folder and run this command <code>java -classpath "D:/weka/ancl.jar;D:/weka_bin/weka.jar"  weka.gui.GUIChooser</code>
  Weka runs normally but I can't find my classifier on the classifiers list.</p>
  
  <p>I've also tried to this classifier to GenericObjectEditor.props file, but when I run weka with the the commmand above I get this exception when I hit Explorer button</p>
  
  <pre><code>$ java -classpath "D:/weka/ancl.jar;D:/weka_bin/weka.jar"  weka.gui.GUIChooser
  ---Registering Weka Editors---
  Checking class: weka.core.MathematicalExpression
  java.lang.ExceptionInInitializerError
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Unknown Source)
          weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          weka.core.AllJavadoc.&lt;clinit&gt;(AllJavadoc.java:59)
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Unknown Source)
          weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericProper                                                                     tiesCreator.java:455)
          weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:                                                                     534)
          weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
          java.awt.Component.processMouseEvent(Unknown Source)
          javax.swing.JComponent.processMouseEvent(Unknown Source)
          java.awt.Component.processEvent(Unknown Source)
          java.awt.Container.processEvent(Unknown Source)
          java.awt.Component.dispatchEventImpl(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Window.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          java.awt.EventQueue.access$000(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue.dispatchEvent(Unknown Source)
          java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.run(Unknown Source)
  
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          at weka.core.AllJavadoc.&lt;clinit&gt;(AllJavadoc.java:59)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPro                                                                     pertiesCreator.java:455)
          at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.ja                                                                     va:534)
          at weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          at weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          at weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          at weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          at weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          at weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour                                                                     ce)
          at java.awt.Component.processMouseEvent(Unknown Source)
          at javax.swing.JComponent.processMouseEvent(Unknown Source)
          at java.awt.Component.processEvent(Unknown Source)
          at java.awt.Container.processEvent(Unknown Source)
          at java.awt.Component.dispatchEventImpl(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Window.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          at java.awt.EventQueue.access$000(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue.dispatchEvent(Unknown Source)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.run(Unknown Source)
  Caused by: java.lang.RuntimeException: Uncompilable source code - package java_c                                                                     up.runtime does not exist
          at weka.core.MathematicalExpression.&lt;clinit&gt;(MathematicalExpression.java                                                                     :26)
          ... 51 more
  Checking class: weka.core.MathematicalExpression
  java.lang.NoClassDefFoundError: Could not initialize class weka.core.Mathematica                                                                     lExpression
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Unknown Source)
          weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericProper                                                                     tiesCreator.java:455)
          weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:                                                                     534)
          weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
          java.awt.Component.processMouseEvent(Unknown Source)
          javax.swing.JComponent.processMouseEvent(Unknown Source)
          java.awt.Component.processEvent(Unknown Source)
          java.awt.Container.processEvent(Unknown Source)
          java.awt.Component.dispatchEventImpl(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Window.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          java.awt.EventQueue.access$000(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue.dispatchEvent(Unknown Source)
          java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.run(Unknown Source)
  
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPro                                                                     pertiesCreator.java:455)
          at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.ja                                                                     va:534)
          at weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          at weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          at weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          at weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          at weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          at weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour                                                                     ce)
          at java.awt.Component.processMouseEvent(Unknown Source)
          at javax.swing.JComponent.processMouseEvent(Unknown Source)
          at java.awt.Component.processEvent(Unknown Source)
          at java.awt.Container.processEvent(Unknown Source)
          at java.awt.Component.dispatchEventImpl(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Window.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          at java.awt.EventQueue.access$000(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue.dispatchEvent(Unknown Source)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.run(Unknown Source)
  Checking class: weka.filters.unsupervised.attribute.MathExpression
  java.lang.ExceptionInInitializerError
          java.lang.Class.forName0(Native Method)
          java.lang.Class.forName(Unknown Source)
          weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericProper                                                                     tiesCreator.java:455)
          weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:                                                                     534)
          weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
          java.awt.Component.processMouseEvent(Unknown Source)
          javax.swing.JComponent.processMouseEvent(Unknown Source)
          java.awt.Component.processEvent(Unknown Source)
          java.awt.Container.processEvent(Unknown Source)
          java.awt.Component.dispatchEventImpl(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          java.awt.Container.dispatchEventImpl(Unknown Source)
          java.awt.Window.dispatchEventImpl(Unknown Source)
          java.awt.Component.dispatchEvent(Unknown Source)
          java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          java.awt.EventQueue.access$000(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.awt.EventQueue$3.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.awt.EventQueue$4.run(Unknown Source)
          java.security.AccessController.doPrivileged(Native Method)
          java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
          java.awt.EventQueue.dispatchEvent(Unknown Source)
          java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          java.awt.EventDispatchThread.run(Unknown Source)
  
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at weka.core.ClassDiscovery.find(ClassDiscovery.java:416)
          at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPro                                                                     pertiesCreator.java:455)
          at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.ja                                                                     va:534)
          at weka.core.converters.ConverterUtils.&lt;clinit&gt;(ConverterUtils.java:714)
          at weka.gui.ConverterFileChooser.&lt;clinit&gt;(ConverterFileChooser.java:110)
          at weka.gui.explorer.PreprocessPanel.&lt;init&gt;(PreprocessPanel.java:162)
          at weka.gui.explorer.Explorer.&lt;init&gt;(Explorer.java:184)
          at weka.gui.GUIChooser.showExplorer(GUIChooser.java:1074)
          at weka.gui.GUIChooser$17.actionPerformed(GUIChooser.java:928)
          at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
          at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
          at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
          at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour                                                                     ce)
          at java.awt.Component.processMouseEvent(Unknown Source)
          at javax.swing.JComponent.processMouseEvent(Unknown Source)
          at java.awt.Component.processEvent(Unknown Source)
          at java.awt.Container.processEvent(Unknown Source)
          at java.awt.Component.dispatchEventImpl(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
          at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
          at java.awt.Container.dispatchEventImpl(Unknown Source)
          at java.awt.Window.dispatchEventImpl(Unknown Source)
          at java.awt.Component.dispatchEvent(Unknown Source)
          at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
          at java.awt.EventQueue.access$000(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.awt.EventQueue$3.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.awt.EventQueue$4.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour                                                                     ce)
          at java.awt.EventQueue.dispatchEvent(Unknown Source)
          at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
          at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
          at java.awt.EventDispatchThread.run(Unknown Source)
  Caused by: java.lang.RuntimeException: Uncompilable source code - package java_c                                                                     up.runtime does not exist
          at weka.filters.unsupervised.attribute.MathExpression.&lt;clinit&gt;(MathExpre                                                                     ssion.java:38)
          ... 47 more
  </code></pre>
  
  <p>Could anyone tell me how the automatic class discovery in Weka works? Or why it doesn't actally :(
  Any help appricieted </p>