将java程序编译为可执行文件 [英] Compiling a java program into an executable

查看:375
本文介绍了将java程序编译为可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:



2- JarToExe 1.8 br>
Jar2Exe是一个将jar文件转换为exe文件的工具。
以下是其网站中描述的主要功能:




  • 可以生成控制台,Windows GUI

  • 生成的exe文件可以加密和保护Java程序

  • 生成的exe文件提供系统托盘图标支持。

  • 生成的exe文件提供记录系统事件日志

  • 生成的windows服务exe文件可以自行安装/卸载,并支持服务暂停/继续。

  • 新版本的x64版本,可以创建64位管理人员。 (2008年5月18日)

  • 支持向导模式和命令行模式。 (2008年5月18日)



下载: http://www.brothersoft.com/jartoexe-75019.html



3-执行者< br>
将Java应用程序打包为jar,Executor会将jar转换为Windows exe文件,与本机应用程序无法区分。只需双击exe文件即可调用Java运行时环境并启动您的应用程序。



下载: http://mpowers.net/executor/



编辑:上面的链接已断开,但这里是页面(具有工作下载)从互联网档案。 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. Please help.

解决方案

You can convert .jar file to .exe on these ways:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆