# Revision history [back]

Hi, it's my first question and I'm really sorry about do the same like all people but I can't find the solution. I have tried to do the basic java tutorial and I have done all steps and finally I have a UnsatisfiedLinkError when I try to run the Dectect Faces Demo.

I have opencv in ~/Trabajo/opencv/ there I have my build/bin and build/lib maked without errors. I work with opencv-248(I have done checkout 2.4 and got that). My project is in ~/Trabajo/JAVA/JavaSample/

The first example runs perfect. Without warnings or something like that and for the last part(Copy the OpenCV jar and write a simple application) I have just modified a code line:

It works in the first exemple but here it says:

Hello, OpenCV [error] (run-main-0) java.lang.UnsatisfiedLinkError: no opencv_java248 in java.library.path java.lang.UnsatisfiedLinkError: no opencv_java248 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1874) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1087) at HelloOpenCV.main(HelloOpenCV.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) [trace] Stack trace suppressed: run last compile:run for the full output. java.lang.RuntimeException: Nonzero exit code: 1 at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last compile:run for the full output. [error] (compile:run) Nonzero exit code: 1 ===================== I have done the next steps into my project folder(~/Trabajo/JAVA/JavaSample/) mkdir lib cp ~/Trabajo/opencv/build/bin/opencv-248.jar lib/ sbt eclipse mkdir src/main/resources cd src/main/resources wget http://docs.opencv.org/2.4.4-beta/_images/lena.png cd ~/Trabajo/JAVA/JavaSample/ cp ~/Trabajo/opencv/data/lbpcascades/lbpcascade_frontalface.xml src/main/resources/ vim src/main/java/HelloOpenCV.java //I copied the code exemple in the file and modified the line I said before sbt run //and then, the error I copied before I don't know what I should do. Thanks for your help and great work! ### Problem with Java tutorial(UnsatisfiedLinkError) Hi, it's my first question and I'm really sorry about do the same like all people but I can't find the solution. I have tried to do the basic java tutorial and I have done all steps and finally I have a UnsatisfiedLinkError when I try to run the Dectect Faces Demo. I have opencv in ~/Trabajo/opencv/ there I have my build/bin and build/lib maked without errors. I work with opencv-248(I have done checkout 2.4 and got that). My project is in ~/Trabajo/JAVA/JavaSample/ The first example runs perfect. Without warnings or something like that and for the last part(Copy the OpenCV jar and write a simple application) I have just modified a code line: System.loadLibrary("opencv_java244"); has to be System.loadLibrary("opencv_java248"); It works in the first exemple but here it says: Hello, *Hello, OpenCV [error] (run-main-0) java.lang.UnsatisfiedLinkError: no opencv_java248 in java.library.path java.lang.UnsatisfiedLinkError: no opencv_java248 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1874) at java.lang.Runtime.loadLibrary0(Runtime.java:849) at java.lang.System.loadLibrary(System.java:1087) at HelloOpenCV.main(HelloOpenCV.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) [trace] Stack trace suppressed: run last compile:run for the full output. java.lang.RuntimeException: Nonzero exit code: 1 at scala.sys.package$.error(package.scala:27) [trace] Stack trace suppressed: run last compile:run for the full output. [error] (compile:run) Nonzero exit code: 11*

=====================

I have done the next steps into my project folder(~/Trabajo/JAVA/JavaSample/)

mkdir lib
cp ~/Trabajo/opencv/build/bin/opencv-248.jar lib/
sbt eclipse
mkdir src/main/resources
cd src/main/resources
wget http://docs.opencv.org/2.4.4-beta/_images/lena.png
cd ~/Trabajo/JAVA/JavaSample/