Ask Your Question
0

OpenCV unable to load library for a dynamic web project

asked 2013-07-03 11:56:15 -0600

Ostaph14 gravatar image

updated 2013-07-04 08:18:37 -0600

I have OpenCV 2.4.5, and I am pretty sure I have setup the project correctly in Eclipse because I have a regular java project with the same settings which works with OpenCV libraries, but my Dynamic Web Project does not.

This is the code for both programs, the second one gets the error

java.lang.UnsatisfiedLinkError: no opencv_java245 in java.library.path
java.lang.ClassLoader.loadLibrary(Unknown Source)
java.lang.Runtime.loadLibrary0(Unknown Source)
java.lang.System.loadLibrary(Unknown Source)
facedetectServlet.doGet(facedetectServlet.java:103)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

Any insight would be helpful

edit retag flag offensive close merge delete

Comments

I am also getting same error. if any one got the solution please post it here.

vivek0402 gravatar imagevivek0402 ( 2013-12-31 01:30:19 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-12-31 23:11:25 -0600

vivek0402 gravatar image

updated 2013-12-31 23:12:30 -0600

try System.loadLibrary(relative path). if it is not working then try System.load(absolute path). and in VM option add -Djava.library.path="path of your dll" its working for me.

edit flag offensive delete link more

Comments

thanks..it helped :)

saumya gravatar imagesaumya ( 2014-06-30 15:21:17 -0600 )edit

i am facing the same issue on standalone tomcat java.lang.UnsatisfiedLinkError: org.opencv.highgui.Highgui.imread_0 i tried everything to system.load -Djava.library.path but still unable to get it work.

jigar.shah gravatar imagejigar.shah ( 2017-05-10 02:07:23 -0600 )edit
1

answered 2013-10-03 16:26:13 -0600

dumoulin.jb gravatar image

Hi

Do you have found the solution ?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-07-03 11:56:15 -0600

Seen: 1,466 times

Last updated: Dec 31 '13