I'm trying to include the openCV library on a little java code. Since I'm not using any IDE, I compile using the following command:
$ javac -cp $CLASSPATH:/usr/local/Cellar/opencv/2.4.12/share/OpenCV/java/opencv-2412.jar Webcam.java
(I installed openCV using brew)
and it compiles just fine, but the moment I run it, throws:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java2412 in java.library.path
from this line:
System.loadLibrary("opencv_java2412");
Could somebody help me?
----- EDIT -----
I've also tried using:
$ export CLASSPATH=$CLASSPATH:/usr/local/Cellar/opencv/2.4.12/share/OpenCV/java/opencv-2412.jar
then:
$ javac Webcam.java
$ java Webcam
getting the same result
opencv-2412.jar, but the library you're trying to load isopencv_java2412. Try looking around in your OpenCV directory for a lib directory or something?