I'm attempting to install Weka, which I have installed into /weka directory. I set the CLASSPATH variable, but that shouldn't matter anyway because I'm using -cp.
I enter this into SSH:
java -Xmx5G -cp /weka/weka.jar weka.core.converters.TextDirectoryLoader -dir /home/myuser/test > /home/myuser/test.arff
And it spits out:
Exception in thread "main" java.lang.NoClassDefFoundError: weka/core/converters/TextDirectoryLoader Caused by: java.lang.ClassNotFoundException: weka.core.converters.TextDirectoryLoader at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: weka.core.converters.TextDirectoryLoader. Program will exit.
What wrong? There is no "weka/core/converters/TextDirectoryLoader" because its all stored in weka.jar, which is where it should be looking.
My Java version:
java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-x86_64) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
I just downloaded Weka today from the link on their downloads page, so there shouldn't be anything wrong with it.
Now I know that this would normally be because it can't find weka.jar, but I promise you that it is right there at: /weka/weka.jar. And I can also promise that both the /weka directory and weka.jar have execute permissions.
Please help!