在 Eclipse 中为我的 Java 应用程序创建 exe?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3013506/
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
Creating exe for my java Application in eclipse?
提问by Praveen
Possible Duplicate:
How can I convert my java program to an .exe file ?
hi folks,
嗨伙计,
how to create the exe file of my application in eclipse? please mention the steps to follow.
如何在eclipse中创建我的应用程序的exe文件?请提及要遵循的步骤。
Thanks
谢谢
采纳答案by Todd Owen
If you're just wondering how to run your application outside the Eclipse IDE, then you don't need an exe. Look for the "Export JAR" option in the menu.
如果您只是想知道如何在 Eclipse IDE 之外运行您的应用程序,那么您不需要 exe。在菜单中查找“导出 JAR”选项。
If the export is done properly (with a MANIFEST generated), you should then be able to run the JAR file by double-clicking on it, or from the commandline with "java -jar FILENAME.jar". Note that this is a platform-independent format.
如果导出正确完成(生成了 MANIFEST),那么您应该能够通过双击来运行 JAR 文件,或者从命令行使用“java -jar FILENAME.jar”。请注意,这是一种独立于平台的格式。
回答by Rahul Sharma
Launch4J:You can use Launch4J application to covert jar to exe.
Launch4J:您可以使用 Launch4J 应用程序将 jar 转换为 exe。
Steps: 1) Create .jar file for your application using your IDE with proper MANIFEST. 2) Run Launch4j and convert .jar to .exe
步骤: 1) 使用带有适当清单的 IDE 为您的应用程序创建 .jar 文件。2) 运行 Launch4j 并将 .jar 转换为 .exe