简体   繁体   中英

netbeans jar build file not opening

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

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. ie

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.!

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM