将java程序编译成可执行文件 [英] Compiling a java program into an executable
问题描述
可能的重复:
(来源:viralpatel.net)
1- JSmooth .exe 包装器:
JSmooth 是一个 Java 可执行文件包装器.它为您的 Java 应用程序创建本机 Windows 启动器(标准 .exe).它使 Java 部署更加流畅和用户友好,因为它能够自己找到任何已安装的 Java VM.当没有可用的 VM 时,包装器可以自动下载并安装合适的 JVM,或者只是显示一条消息或将用户重定向到网站.
JSmooth 为您的 Java 应用程序提供了多种包装器,每个包装器都有自己的行为:选择您的风格!
下载:http://jsmooth.sourceforge.net/
2- JarToExe 1.8
Jar2Exe 是一个将 jar 文件转换为 exe 文件的工具.以下是其网站中描述的主要功能:
- 可以生成Console"、Windows GUI"、Windows Service"三种类型的exe文件.
- 生成的exe文件可以添加程序图标和版本信息.
- 生成的exe文件可以对java程序进行加密和保护,程序运行时不会产生临时文件.
- 生成的 exe 文件提供系统托盘图标支持.
- 生成的 exe 文件提供记录系统事件日志支持.
- 生成的windows服务exe文件可以自行安装/卸载,支持服务暂停/继续.
- 新发布的 x64 版本,可以创建 64 位执行程序.(2008 年 5 月 18 日)
- 支持向导模式和命令行模式.(2008 年 5 月 18 日)
下载:http://www.brothersoft.com/jartoexe-75019.html
3- 执行器
将您的 Java 应用程序打包为 jar,Executor 会将 jar 转换为 Windows exe 文件,与本机应用程序无法区分.只需双击 exe 文件即可调用 Java 运行时环境并启动您的应用程序.
上面的链接已损坏,但这里是 Internet Archive 中的页面(带有有效下载).http://web.archive.org/web/20090316092154/http://mpowers.net/executor/
4- 高级安装程序
高级安装程序可让您在几分钟内创建 Windows MSI 安装.这也支持 Windows Vista,还有助于创建其他语言的 MSI 包.
下载:http://www.advancedinstaller.com/请告诉我您用于将 JAR 转换为 EXE 的其他工具.
Possible Duplicate:
How do I create an .exe for a Java program?
I've just made a simple program with Eclipse and I want to compile it into an executable, but simply can't seem to find out how to do it.
You can convert .jar file to .exe on these ways:
(source: viralpatel.net)
1- JSmooth .exe wrapper:
JSmooth is a Java Executable Wrapper. It creates native Windows launchers (standard .exe) for your java applications. It makes java deployment much smoother and user-friendly, as it is able to find any installed Java VM by itself. When no VM is available, the wrapper can automatically download and install a suitable JVM, or simply display a message or redirect the user to a web site.
JSmooth provides a variety of wrappers for your java application, each of them having their own behaviour: Choose your flavour!
Download: http://jsmooth.sourceforge.net/
2- JarToExe 1.8
Jar2Exe is a tool to convert jar files into exe files.
Following are the main features as describe in their website:
- Can generate "Console", "Windows GUI", "Windows Service" three types of exe files.
- Generated exe files can add program icons and version information.
- Generated exe files can encrypt and protect java programs, no temporary files will be generated when program runs.
- Generated exe files provide system tray icon support.
- Generated exe files provide record system event log support.
- Generated windows service exe files are able to install/uninstall itself, and support service pause/continue.
- New release of x64 version, can create 64 bits executives. (May 18, 2008)
- Both wizard mode and command line mode supported. (May 18, 2008)
Download: http://www.brothersoft.com/jartoexe-75019.html
3- Executor
Package your Java application as a jar, and Executor will turn the jar into a Windows exe file, indistinguishable from a native application. Simply double-clicking the exe file will invoke the Java Runtime Environment and launch your application.
Download: http://mpowers.net/executor/
EDIT: The above link is broken, but here is the page (with working download) from the Internet Archive. http://web.archive.org/web/20090316092154/http://mpowers.net/executor/
4- Advanced Installer
Advanced Installer lets you create Windows MSI installs in minutes. This also has Windows Vista support and also helps to create MSI packages in other languages.
Download: http://www.advancedinstaller.com/
Let me know other tools that you have used to convert JAR to EXE.
这篇关于将java程序编译成可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!