Hi everyone,
I got a problem with setting up the environment of OpenCV for running Hadoop. I modified the hadoop-env.sh file: HADOOP_CLASSPATH to include the opencv-300.jar and libopencv_java300.so. I can compile it correctly. But when I use the `Mat mat = new Mat(h, w, type)`, it shows me *java.lang.Exception: java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(III)J*. I google it and find that I should load the dynamic library. Then I add this line `static {System.loadLibrary(Core.NATIVE_LIBRARY_NAME);}`. Then it shows me that *Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java300 in java.library.path*. But I've copied the opencv-300.jar and libopencv_java300.so to the /usr/lib dir. What am I supposed to do?
I know I can use the `-Djava.library.path=/path/to/libs` to handle this problem. But it doesn't work with Hadoop.
I really need some help here as the project is due on Nov.29.
Thanks in advance.
↧