gpt4 book ai didi

java - .class 到 jar 和 .class 到 exe 的转换

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:09:04 24 4
gpt4 key购买 nike

我如何转换:

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

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

最佳答案

类文件转jar文件

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

file 如果任何文件是一个目录,那么它被递归处理。 list 文件名和存档文件名需要按照“m”和“f”标志的相同顺序指定指定。

Example 1: to archive two class files into an archive called classes.jar:

`jar cvf classes.jar Foo.class Bar.class` 

示例 2:使用现有 list 文件“mymanifest”并归档

all the files in the foo/ directory into 'classes.jar':

jar cvfm classes.jar mymanifest -C foo/ .

将jar文件转换为.exe文件

1) JSmooth .exe wrapper

2) JarToExe 1.8

3) Executor

4) Advanced Installer

Convert .class to .exe is discussed in length here

关于java - .class 到 jar 和 .class 到 exe 的转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5290914/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com