opencv-2.4.4 in java.library.path error
following the tutorial and writing in eclipse
import org.opencv.core.CvType;
import org.opencv.core.Mat;
public class Main {
public static void main(String[] args) {
System.loadLibrary("opencv_java244");
Mat m = Mat.eye(3, 3, CvType.CV_8UC1);
System.out.println("m = " + m.dump());
}
}
I get
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java244in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at Main.main(Main.java:9)
same problem with netbeans thought the libraries exist including the opencv native i.e libopencv.so
make sure you use tha latest tutorial (updated on February 28) and the 2.4.4 release package (not beta that contained bugs).
Make sure you setup reference to the native lib folder correctly.
Also specify your OS for further suggestions.
My OS is ubuntu 13.04 ok I solved with the right LIB PATH and the sample program load right the opencv version but Mat m = Mat.eye(4, 4, CvType.CV_32F); lead to Unsupported major.minor version 51.0 why?
have you tried to set JAVA_HOME env var correctly?
problem solved thanks
@fferrieu I have the same problem, what did u do to solve this problem? I use eclipse to run the HelloCV tutorial and follow the latest tutorial. I just found that my error msg is a bit different, I got "java.lang.UnsatisfiedLinkError: no 2.4.4.0 in java.library.path" while @fferrieu got "no opencv_java244in java.library.path", i don't know why, I used the prebuilt opencv_244.jar, someone please help..
I just found that my error message is a bit different, i got "java.lang.UnsatisfiedLinkError: no 2.4.4.0 in java.library.path" whle @fferrieu got "opencv_java244" on his msg, I don't know why, someone please help..
@fferrieu, I still with the same problem. My .jar files are in /build/bin and my native .so are in /build/lib. But even with this paths set correctly on eclipse, the problem persists; Wich was the correct JAVA_HOME that you say, and how did you set it?
System.loadLibrary("opencv_java246") doesn't works ! please guide !
For ubuntu http://exintopro.net/blog/2013/10/02/setting-up-eclipse-for-using-opencv-java-in-ubuntu/