I got a programm which use the opencv library that run well on netbeans but when i try to run it outside of netbeans using this command:
java -jar RecupPhotoV1
pause
i got this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java300 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 recupphoto.Ihm.<init>(Ihm.java:96)
at recupphoto.RecupPhoto.main(RecupPhoto.java:18)
I got the project builded into the folder dist, with jar here and opencv_300.jar in a lib folder. My objective is to make this app runnable on other computers whithout netbeans just by lauching a .bat or a script in the same folder than my jar
-----------------------------------------------------------------------------
edit: Tried some things yesterday, i exported my project from netbeans to eclipse, followed a new tutorial with new manifest etc and i think, things are going better. Now if i execute:
java -jar RecupPhoto.jar
with this manifest:
Manifest-Version: 1.0
Main-class: RecupPhoto
Class-path: opencv-300.jar
i got a thread error,
Exception in thread "main" java.lang.NoClassDefFoundError: org/opencv/videoio/VideoCapture
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
at java.awt.Component.access$500(Unknown Source)
at java.awt.Component$3.run(Unknown Source)
at java.awt.Component$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Unknown Source)
at java.awt.Component.<init>(Unknown Source)
at java.awt.Container.<init>(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at Ihm.<init>(Ihm.java:82)
at RecupPhoto.main(RecupPhoto.java:10)
Caused by: java.lang.ClassNotFoundException: org.opencv.videoio.VideoCapture
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
Duno what can be the cause of it?