java 如何将可执行 JAR 文件打包成 EXE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17176900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to package executable JAR file into EXE
提问by Aman
I would like to deploy my final build as an EXE with an application Icon.
我想将我的最终版本部署为带有应用程序图标的 EXE。
What is the best way to do this? What is the common practice?
做这个的最好方式是什么?通常的做法是什么?
回答by Motiejus Osipovas
Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one, and it's possible to set runtime options, like the initial/max heap size. The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.
Launch4j 是一种跨平台工具,用于将作为 jar 分发的 Java 应用程序包装在轻量级 Windows 本机可执行文件中。可执行文件可以配置为搜索某个 JRE 版本或使用捆绑版本,并且可以设置运行时选项,例如初始/最大堆大小。包装器还通过应用程序图标、本机预 JRE 启动画面、自定义进程名称和 Java 下载页面提供更好的用户体验,以防找不到合适的 JRE。