简体   繁体   English

netbeans jar构建文件无法打开

[英]netbeans jar build file not opening

I have build my project using OpenCV. 我使用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. 当我通过netbeans运行我的项目时运行正常..但是当我通过Clean and Build创建它的jar文件时它不会打开。 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. 这是因为您在netbeans中包含了VM选项路径。 and Netbeans Automatically calls it whenever it is executed. 和Netbeans在执行时自动调用它。

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.! 希望这个能对您有所帮助。!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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