将.class转换为jar,将.class转换为exe

Suh*_*pta 9 java exe jar .class-file

我如何转换:

  • 使用cmd将jar文件转换为jar文件?
  • 类文件到exe文件?
  • jar文件到exe?

我可以将exe文件转换为jar文件吗?

ayu*_*ush 17

jar文件的类文件

用法:jar {ctxu} [vfm0M] [jar-file]

[manifest-file] [-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
Run Code Online (Sandbox Code Playgroud)

file如果任何文件是目录,则以递归方式处理它.清单文件名和存档文件名需要按照指定'm'和'f'标志的顺序指定.

示例1:将两个类文件存档到名为classes.jar的存档中:

`jar cvf classes.jar Foo.class Bar.class` 
Run Code Online (Sandbox Code Playgroud)

示例2:使用现有的清单文件'mymanifest'并存档

foo /目录中的所有文件都变成'classes.jar':

jar cvfm classes.jar mymanifest -C foo/ .
Run Code Online (Sandbox Code Playgroud)

将jar文件转换为.exe文件

1)JSmooth .exe包装器

2)JarToExe 1.8

3)执行人

4)高级安装程序

这里将详细讨论将.class转换为.exe