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
)
精彩评论