简体   繁体   中英

Libsvm classes not in CLASSPATH

I am trying to use Weka libsvm implementation. I have installed weka - 3.6 version and I add in weka folder libsvm.jar file. I put the whole path of the .jar file in my CLASSPATH in environment variables. However when I tried to use libsvm function from the WEKA Api I am receiving the following message: libsvm classes not in CLASSPATH . When I type in console echo %CLASSPATH% I am getting C:\\Program Files\\Weka-3-6\\libsvm.jar which is the libsvm file. Any idea what may be wrong?

The default batch script to run weka is using the following commands:

set _cmd=%1
set _java=javaw
if "%_cmd%"=="" set _cmd=default
if "%_cmd%"=="-h" set _java=java
%_java% -classpath . RunWeka -i .\RunWeka.ini -w .\weka.jar -c %_cmd% "%2"

I am also tried to run just the weka.jar file with java -jar weka.jar. I got the same message error in both cases.

If you explicitly use the -classpath flag, the %CLASSPATH% variable is not used. You can either add libsvm to the -classpath (it's semicolon separated on windows) or add weka to the CLASSPATH variable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM