Java linker error when trying out tutorial
I just followed 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
SOLUTION:
after you find the .jar
the next you should do set the native library location '~~~~~~~~~/opencv/build/lib'
to import the libopencv_java246.so to native library location.
Hope that helps you.
Thanks
Basically I do not get why you are posting this question if you already have the solution? Could you point to a topic where this problem arised? We can then copy the answer to it.