开发者

Error when trying to launch an executable .jar file

开发者 https://www.devze.com 2023-01-05 04:56 出处:网络
when in try to run开发者_开发知识库 jar file this error shown : \"failed to load main-class manifest attribute from ...\"

when in try to run开发者_开发知识库 jar file this error shown : "failed to load main-class manifest attribute from ..." but when i run project in netbeans it`s run successfuly !!!


If you want to run a JAR file directly (java -jar program.jar), you must set the Main-Class attribute in the manifest file. See http://java.sun.com/docs/books/tutorial/deployment/jar/appman.html for details.

Otherwise, you need to set the JAR on the classpath instead and tell it the class to run. (java -cp program.jar class.with.main.method)

0

精彩评论

暂无评论...
验证码 换一张
取 消