Java 如何在 NetBeans 中制作 exe?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1973431/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 01:57:26  来源:igfitidea点击:

How can I make an exe in NetBeans?

javanetbeansjarexecutable

提问by Tuffy G

Possible Duplicate:
How can I convert my java program to an .exe file ?

可能重复:
如何将我的 java 程序转换为 .exe 文件?

How can I create an .exe file in NetBeans for a Java program?

如何在 NetBeans 中为 Java 程序创建 .exe 文件?

I've had a look around, and I can make a JAR but not an exe.

我环顾四周,我可以制作 JAR,但不能制作 exe。

采纳答案by Gregory Pakosz

Have a look at JAR wrappers like Jar2Exe, JSmoothor Launch4j.

查看 JAR 包装器,如Jar2ExeJSmoothLaunch4j

They will wrap your JAR inside an executable which role is to launch the JVM.

他们会将您的 JAR 包装在一个可执行文件中,该文件的作用是启动 JVM。

回答by Yin Zhu

If it is Java. You may need another tool to pack an exe for your application. E.g. http://www.duckware.com/jexepack/index.html

如果是Java。您可能需要另一个工具来为您的应用程序打包 exe。例如http://www.duckware.com/jexepack/index.html

回答by Joonas Pulakka

There are wrappers like Launch4jthat can wrap .jars into .exelaunchers. However, even those require the JRE to be present in the system to work.

有像Launch4j这样的包装器可以将.jars包装到.exe启动器中。然而,即使是那些需要 JRE 存在于系统中才能工作。