Reputation: 1097
I have build my project using OpenCV. When I run my project through netbeans it runs fine.. but when I create its jar file via Clean and Build
it doesn't open.
it displays a message in output screen when it is build that is..
To run this application from the command line without Ant, try:
java -jar "C:\Users\Rafi Abro\Documents\NetBeansProjects\WebCam\dist\WebCam.jar"
I also tried to open my project through this command..
java -jar WebCam.jar
but it displayed error below:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java2410 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 javaanpr.Main.main(Main.java:154)
please can anyone help me through out this problem..
Thanks
Upvotes: 3
Views: 1219
Reputation:
This is because you have included VM option path in netbeans. and Netbeans Automatically calls it whenever it is executed.
now when you are trying to run command. i.e.
java -jar WebCam.jar
there is not path defined in command, thatsy you are getting that error..
try this command:
java -Djava.library.path="C:\OpenCV\opencv\build\java\x86" -jar WebCam.jar
hope this will help you.!
Upvotes: 2