简体   繁体   中英

how to make a swing as a exe file

I have java class in which I am doing some business functionality, now what I want is a standalone file so that user dont need to write java command to execute it but he can directly execute it as .exe file. Can anybody help me in this? I hope I was clear

I would recommend to create a JAR file of your Java classes.

JAR file can be executed with: java -jar filename.jar

For default installation in Windows, there will be a file association between JAR files and Java, such that one can double click on the jar file to execute it (ie, it behaves like an exe file).

First make a jar file and then wrap your jar file into .exe. There are plenty softwares available. Just google jar to exe

Have a look at launch4j . It encapsulate a jar into a .exe.

It has a lot of other useful functionalities such as checking for the correct JRE version or giving download links in case Java is not installed.

简单地说,创建一个jar并在清单文件中放入您要运行的主类的入口点,请确保您的jar已使用JRE版本正确编译,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM