简体   繁体   English

jar文件问题

[英]jar file problem

当我尝试从netbeans运行jar文件时,它工作正常,但是当我尝试通过命令提示符运行时,它使我在线程错误中得以执行,但是当我检查任务管理器时,它表明javaw.exe正在运行。 .......确切是什么以及为什么此错误仅出现在命令提示符下?

compile your application with: 使用以下命令编译您的应用程序:

>javac -jar example.jar ClassName.java

Run: 跑:

>java -jar example.jar ClassName

Can you please paste the exception that you get. 您能否粘贴得到的异常。

When running from command line, you have make sure that classpath for your program is set properly. 从命令行运行时,请确保正确设置了程序的类路径

Make user that you have set the main-class in your manifest file of you jar. 让用户在jar的清单文件中设置主类

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

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