I can debug in eclipse: I print System.out.println( System.getProperty("java.library.path")); /Users/solitarylord/Documents/Programming/opencv-2.4.5/build/lib But when I export in, the jar 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?