• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception in thread "main" java.lang.NoClassDefFoundError: libsvm/svm_print_interface  RSS feed

 
arwa ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have run a code containing some methods. every thing should be OK and the program is running well until it reach the following method, it stopped and give me an error. The method as follows

    }
And the error that I got as follows


help me please I am running out of time. thanks
 
Dave Tolls
Ranch Foreman
Posts: 3065
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you have the wrong versions of jar files there.

You'll need to check exactly what version of Weka that the version of Java-ML you are using is expecting.
 
arwa ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used weka 2.7 and java 1.7. Are they compatible?
 
arwa ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
arwa ali wrote:I used weka 3.7 and java 1.7. Are they compatible?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As a weird side note, you were able to compile. So, the version that you used to compile, doesn't seem to be the same version that you used to run it... or is this not your code (ie. originally compiled by someone else)?

Henry
 
Dave Tolls
Ranch Foreman
Posts: 3065
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not Weka and Java, it's Weka and Java-ML...the package this class comes from:
net.sf.javaml.tools.weka.ToWekaUtils
 
Dave Tolls
Ranch Foreman
Posts: 3065
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for why it's compiling, it isn't compiling the Java-ML jar.
Hence the issue.

Java-ML uses Weka, but the version of Weka that the Java-ML jar was compiled against is different than the one being used when the OPs code is run.  One difference being a missing constructor (by the looks of it).
 
arwa ali
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for the reply..  for the java ML I used javaml-0.1.7. jar and for weka I used weka-3.7.0.jar . so what do you think? Am I right or wrong?
 
Dave Tolls
Ranch Foreman
Posts: 3065
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea, but the download for Java-ML comes with all the things it needs.
The weka.jar doesn't say what version it is.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!