如何使用cmd将class文件转换为jar文件?
- 如何将class文件转换为exe文件?
- 如何将jar文件转换为exe文件?
能否将exe文件转换为jar文件?
如何使用cmd将class文件转换为jar文件?
能否将exe文件转换为jar文件?
将类文件转换为jar文件
如果任何文件是目录,则会进行递归处理。清单文件名和存档文件名需要按照'm'和'f'标志指定的相同顺序进行指定。Usage: jar {ctxu}[vfm0M][jar-file]
[manifest-file] [-C dir] files ...
Options:
-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
Example 1: to archive two class files into an archive called classes.jar:
`jar cvf classes.jar Foo.class Bar.class`
示例2:使用现有清单文件'mymanifest'和归档文件
将foo/目录中的所有文件归档到'classes.jar'中:
jar cvfm classes.jar mymanifest -C foo/ .
你可能错过了this。请查看Java归档(JAR)文件指南。
而且肯定会错过Real's How to for it 将JAR打包成可执行文件。有多个包装器可以完成此工作(将Jar转换为exe,特定于平台)。你只需要在StackOverflow中搜索Jar exe即可。
使用命令行创建jar文件。答案在http://download.oracle.com/javase/tutorial/deployment/jar/build.html
将类转换为exe。答案在http://www.javacoffeebreak.com/faq/faq0042.html
Jar转换为exe。答案在http://viralpatel.net/blogs/2009/02/convert-jar-to-exe-executable-jar-file-to-exe-converting.html
将exe转换为jar文件是可能的,但需要进行反向工程来发现exe中的内容,提取并对其进行任何想要的操作。在我看来,这完全不值得。