0

I have the last Ubuntu version on my computer and i tried many times to install the library Libsvm,following the instructions at this link: https://www.php.net/manual/en/svm.requirements.php. The link is for installing the library in php,but to add the php extensions,the library need first to be installed in java.

I hadn't any problems with this commands,(obviously,i typed all the commands for the latest version of the library,3.24)but when comes the moment to compile the test file.java with the javac command,the compiler doesn't recognise my SVM class... Here I paste the code in the java file.

svm_predict svm = new svm_predict();

And I also tried this :

LibSVM svm = new LibSVM();

I'm really desperate,please give me a hint!

1 Answers1

1

In order to use libsvm within your Java project, you need to add the corresponding JAR file (libsvm.jar) to your classpath.

I suggest to use an IDE (such as Eclipse or IntelliJ) for Java programming in order to manage the libraries in your classpath.

If you prefer to stay with command-line compiling via javac, you can use the parameter -cp to add libraries to your classpath. You can find details for it in this post on Stackoverflow.

rzo1
  • 5,561
  • 3
  • 25
  • 64