Unable to load opencv jar

asked 2018-06-28 14:07:26 -0600

vishalsira gravatar image

I am trying to load opencv jar file into dynamic web project of java EE but i'm unable to load opencv

i'm trying to load using static block

static{ System.loadLibrary("opencv_java2413"); }

as well as i tried with

 static{ System.load("opencv_java2413"); }

how can i configure opencv with java EE project

edit retag flag offensive close merge delete

Comments

The open cv native libraries(c++) cannot be found. check https://opencv-java-tutorials.readthe... And search and try to understand "java.library.path"

holger gravatar imageholger ( 2018-06-29 01:24:49 -0600 )edit

i'm read that already and follow the same procedure but still it is showing me same error

vishalsira gravatar imagevishalsira ( 2018-06-29 05:23:50 -0600 )edit
1

What opencv version are you using - you code tries to find the native libs for 2413, in my code i am using:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

This way i am sure i am loading the correct native libraries. To track down your problem, Try write a small java programm using opencv(with main method) and try to execute it from command line. If you got this working, just adopt it for your javaee container.

I also spent some time on this "problem". Its just some config stuff. Note thats there a big difference between System.load and System.loadLibrary. One is expecting a full path, the other not(don't remember which does what).Please read javadoc for this.

holger gravatar imageholger ( 2018-06-29 05:31:03 -0600 )edit