after export jar java, no opencv_java245 in java.library.path

asked 2013-07-03 23:48:35 -0500

abelkun gravatar image

updated 2013-07-04 08:15:21 -0500

I can debug in eclipse:

I print

System.out.println( System.getProperty("java.library.path"));

Output is :

/Users/solitarylord/Documents/Programming/opencv-2.4.5/build/lib

But when I export in the jar I cannot run. The error in console is like these:

/Users/solitarylord/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java245 in java.library.path

How to load library?

edit retag flag offensive close merge delete

Comments

When exporting to JAR files, you better create relative paths to the files, since they can be on different locations on several machines.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-04 08:16:36 -0500 )edit

I am also looking for the answer to this question. Nothing seems to have worked so far.

alistair3408 gravatar imagealistair3408 ( 2013-09-12 10:09:17 -0500 )edit