回答
類文件的JAR文件
用法:罐子{ctxu} [vfm0M] [JAR文件]
[清單文件] [-C DIR]文件...
選項:
-c create new archive -t list table of contents for archive -x extract named (or all) files from archive -u update existing archive -v generate verbose output on standard output -f specify archive file name -m include manifest information from specified manifest file -0 store only; use no ZIP compression -M do not create a manifest file for the entries -i generate index information for the specified jar files -C change to the specified directory and include the following
文件如果任何文件是目錄則遞歸處理。清單文件名稱和存檔文件名稱需要按照指定的'm'和'f'標誌相同的順序指定 。
實施例1:歸檔2類文件到名爲classes.jar存檔:
`jar cvf classes.jar Foo.class Bar.class`
實施例2:使用現有的清單文件 'mymanifest' 和歸檔
foo /目錄中的所有文件轉換爲'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ .
將jar文件轉換爲。exe文件
3)Executor
使用命令行創建jar文件。 http://download.oracle.com/javase/tutorial/deployment/jar/build.html
要exe的類。回答問題http://www.javacoffeebreak.com/faq/faq0042.html
Jar to exe。在http://viralpatel.net/blogs/2009/02/convert-jar-to-exe-executable-jar-file-to-exe-converting.html中回答
將exe轉換爲jar文件是可能的。但是需要進行逆向工程來發現exe文件中的內容,並提取和執行您想要的任何內容。在我看來,根本不值得。
你一定錯過了this。請查看Java Archive (JAR) Files Guide。
肯定錯過了Real的如何爲它Make a JAR executable有這樣做的工作(轉換JAR爲EXE,平臺特定)的多個包裝。您只需要search in StackOverflow for Jar exe
如果您使用的是Netbeans IDE,那麼從.class文件創建.exe文件不會花費太多時間。在IDE中,創建一個新項目並將Java程序放入此項目中。現在按照下列步驟 -
- 右鍵單擊項目並選擇屬性。
- 從左側面板中選擇運行,然後在右側面板中輸入主要類(定義主要方法)。
- 再次右鍵單擊該項目並選擇添加庫。選擇擺動佈局擴展。點擊添加庫。 4.現在從IDE的運行菜單中選擇clean和build。確保你已經將這個項目設置爲主項目。
- 打開CMD並將目錄設置爲您的項目。轉到「dist」>並輸入java -jar jarname.jar。
- 您的程序現在正在cmd中運行。
- 打開launch4j並提供所需的信息。
- 運行並享受您的應用程序。
- 1. 我們可以轉換.class文件到.exe文件中
- 2. 轉換jar文件到exe
- 3. 轉換的.java到的.class
- 4. 從Class文件和Jar文件創建JAR文件
- 5. class文件轉換爲java文件
- 6. 將.class文件轉換爲.java文件
- 7. 將.class文件加載到jar中?
- 8. 獲取嵌套.jar中的.class文件
- 9. 轉換的FeedResponse <Class>到列表<Class>在DocumentDB
- 10. 從[class name]到[class name]沒有合適的轉換函數*
- 11. Java .class文件與jar中的jar文件
- 12. 如何將const Class *轉換爲Class *?
- 13. 如何將所有.class文件從.jar文件轉換成.java文件
- 14. .class轉換成.java?
- 15. JAR到EXE轉換器?
- 16. 有關使用jar文件的.class文件的命令
- 17. 如何將我的* .py文件轉換爲* .class文件?
- 18. 如何在C++文件中使用「.class」或「.jar」java文件(無轉換)?
- 19. 在「class only」jar文件中提供javadoc
- 20. 使用Java Class和Jar文件找不到或加載主類
- 21. 何時檢查和使用Jar文件中的Class-Path屬性
- 22. 將JAR插入到沒有Class文件的html中
- 23. ‘* HTML的.class’和‘HTML>體的.class’
- 24. Maven使用.class和.java文件創建jar文件
- 25. IntelliJ:.java和.class文件在.jar文件中
- 26. Maven Build不包括jar文件中的.class文件
- 27. 如何jar文件轉換成exe和轉
- 28. 將.class轉換爲.java
- 29. 將Class []轉換爲泛型?
- 30. 在.class文件
你想實際編譯原生Java,還是隻是在類文件/ jar中創建一個包裝? – berry120 2011-03-13 17:38:22