Ask Your Question

Charles_Lovely's profile - activity

2013-07-25 15:15:43 -0600 received badge  Supporter (source)
2013-07-18 14:45:44 -0600 commented answer JNI error on playframework v2.1.1 UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(IIIDDDD)J

I've been having a similar problem lately - how did you get Play to find the appropriate native libraries? Did you update the configuration in Build.scala in some way? Updating the extension doesn't seem to be enough in my case.

2013-07-17 19:14:52 -0600 received badge  Editor (source)
2013-07-17 16:31:05 -0600 asked a question How to use OpenCV in Java Play2 with IntelliJ

Can someone detail the step-by-step process for setting up IntelliJ to use OpenCV?

The docs are really helpful if you are using something like Eclipse: http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html

But I haven't been able to figure out the equivalent process in IntelliJ. Note that I'm not making an Android app - I just want to leverage the Java implementation of OpenCV on the back-end of our web service. See my stack overflow post here for additional details: http://stackoverflow.com/questions/17708150/intellij-does-not-find-native-libraries-for-opencv-when-adding-jar-as-a-dependen

If it helps narrow the potential cause of the problem, following all the steps for Running SBT Samples in the OpenCV Java Docs also gives me a similar error:


charles@charles-VirtualBox:~/JavaSample$ sbt run
[info] Loading project definition from /home/charles/JavaSample/project
[info] Set current project to JavaSample (in build file:/home/charles/JavaSample/)
[info] Compiling 1 Java source to /home/charles/JavaSample/target/scala-2.10/classes...
[info] Running HelloOpenCV 
Hello, OpenCV
[error] (run-main) java.lang.UnsatisfiedLinkError: no opencv_java246 in java.library.path
java.lang.UnsatisfiedLinkError: no opencv_java246 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
    at java.lang.Runtime.loadLibrary0(Runtime.java:845)
    at java.lang.System.loadLibrary(System.java:1084)
    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:601)
[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
[error] Total time: 2 s, completed Jul 17, 2013 5:11:39 PM