after export jar java, no opencv_java245 in java.library.path
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?
When exporting to JAR files, you better create relative paths to the files, since they can be on different locations on several machines.
I am also looking for the answer to this question. Nothing seems to have worked so far.