如何使用Eclipse在JAVA中创建可执行文件(像.exe一样双击启动程序的文件)?
问题描述:
我已经用Java创建了一个程序,现在我想从中创建一个可执行文件.
我是java的新手,我不知道它是否应该是.exe
.
我将项目导出到了.jar
文件,但是当我双击它时,它将打开打开方式"窗口.
I've created a program in java and now I want to create an executable from it.
I'm new to java, I don't know if it should be a .exe
.
I'we exported my project to a .jar
file, but when I double-click it it opens "open with" window.
我想将项目导出到可以双击运行程序的文件.
I want to export my project to a file that runs my program on double-click.
有什么解决办法吗?
答
导出-> Java->可运行的Jar文件->用静态main方法指定要运行的类.
Export --> Java --> Runnable Jar file --> Specify the class with static main method to run.
双击Jar文件即可运行.
Double click on the Jar file to run..
谢谢...