jar cvef Main.jar Main *
added manifest
adding: DrawPane.class(in = 344) (out= 257)(deflated 25%)
adding: DrawPane.java(in = 306) (out= 175)(deflated 42%)
adding: main(in = 9038) (out= 8275)(deflated 8%)
adding: Main.class(in = 868) (out= 544)(deflated 37%)
adding: Main.java(in = 507) (out= 260)(deflated 48%)
adding: Manifest.txt(in = 18) (out= 18)(deflated 0%)
adding: src/(in = 0) (out= 0)(stored 0%)
adding: src/icon.png(in = 1163) (out= 1168)(deflated 0%)
adding: src/Thumbs.db(in = 3584) (out= 1038)(deflated 71%)
jar文件創建的,那麼:的Java不能執行jar文件沒有主清單屬性
java -jar Main.jar
我得到一個錯誤:
no main manifest attribute, in Main.jar
什麼我'做錯了什麼?
的[可能重複,無法執行JAR-文件:「沒有主清單屬性」](http://stackoverflow.com/questions/9689793/cant-execute-jar-file-no-main-manifest-attribute) –
但我做得很好,不能理解爲什麼找不到Manifest屬性?看看輸出... –
這不是重複的,請你看看我的代碼,並給我一個什麼是不正確的建議?因爲我得到一個消息,「添加清單」,但仍然沒有找到它執行... –