0
votes

problem in working with WEKA 3.6

I want to utilize libsvm.jar but the error "not in the classpath" occurs when I run weka with the command prompt as below:

java -Xmx900m -jar Weka.jar

please note that we use libsvm library when I run weka in normal mode (with the initial heap size and without using command prompt). besides, I use windows 7-32bit.

help me plz I am running out of time. thanks

2

2 Answers

0
votes

Find out where libsvm.jar is and include it in the classpath, e.g.

java -Xmx900m -classpath '.:/usr/share/java/libsvm.jar' -jar Weka.jar

The actual location of libsvm.jar will depend on your system.

0
votes

The other answer wasn't working for me. According to the Weka documentation, to include LibSVM in the classpath requires not using the "-jar weka.jar" option. Specifying -jar overrides the classpath that you are trying to set.

Instead, use

java -Xmx900m -classpath $CLASSPATH:weka.jar:libsvm.jar weka.gui.GUIChooser