Sorry but I not Have a solution for my problem. Can you help me?
I have an application on Eclipse and it work correctly with openCV, but if export it in a jar executable jar, I have the error from the command prompt when launching the jar:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java249 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at grafic.WindowInterface.windowsValidate(WindowInterface.java:695)
at grafic.WindowInterface.validate(WindowInterface.java:677)
at grafic.WindowInterface$4.widgetSelected(WindowInterface.java:388)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at grafic.WindowInterface.open(WindowInterface.java:122)
at grafic.WindowInterface$1.run(WindowInterface.java:105)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at grafic.WindowInterface.main(WindowInterface.java:101)
I have intalled the open CV(2.4.9) from this tutorial.
I have added on Windows sistem path this variable :
C:\\Program Files\\Java\\opencv\\build\\x86\\vc10\\bin;
I have create the executable jar as in this tutorial.
Have you suggestions?Why the application work correctly on eclipse and not work in the executable jar?
Thanks for help.
Sorry, I dont't have solutions.
I must pack my openCV.jar library into an executable java project .jar.
I had the same problem.
It happened because I had a mistake with the 'Native library location' configuration:
Goto Eclipse -> Window -> Preferences:
Goto User Libraries:
Make sure that your native library location path is (change c:/opencv-2.4.9 to your own opencv folder):
C:/opencv-2.4.9/build/java/x64
and not:
C:/opencv-2.4.9/build/x64
(I missed the /java folder...)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.