Ask Your Question

jiting's profile - activity

2013-07-15 07:39:11 -0600 answered a question opencv-2.4.4 in java.library.path error

for ubuntu 13.04, the .so file locate under build/lib.

That works for me.

Thanks

2013-07-15 07:37:36 -0600 asked a question 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