平时,我们启动jar程序常用做法是在命令窗口输入java -jar jarName.jar ,为了方便使用,需要转为exe执行程序,exe4j软件能快速的实现,此软件仅有6M,非常好用
下面介绍软件的使用
官网下载地址:
http://www.softpedia.com/get/Authoring-tools/Setup-creators/exe4j.shtml
安装完成后,启动界面
1.欢迎界面,可以点击open导入以前的转换设置

2.选择“JAR in EXE” mode,将jar转为exe可执行程序

3.设置转换后程序的快捷方式名称、存储路径

4.1设置程序名称,程序图标。

4.2设置程序运行在32位或64位系统。其他设置不用改,默认即可

5.导入要转换的jar,选择jar程序入口类

6.设置环境变量

7.设置程序运行时需要的jdk版本

8.点击9 Compile executable开始转换

此时文件已经打包成功。需要注意的是,软件未注册,每次打开exe会提示

如果项目引用了第三方jar包,即项目build path有依赖其它的jar库时,要在


免jdk安装设置:

把jdk中的jre文件夹放到执行文件目录,设置图中参数。即可不安装jdk来运行程序。
(相关链接 http://blog.csdn.net/littlesshark/article/details/51800475 用java直接转exe)
网友评论