Home > Java > JavaBase > How to export exe from java

How to export exe from java

angryTom
Release: 2019-11-15 10:43:12
Original
6934 people have browsed it

How to export exe from java

How to export exe from java

To export a Java project to an .exe executable file, you need to export the java project first to a .jar file, and then convert the jar file to an .exe file. The specific method is as follows:

1. Export the .jar file

1. Right-click the project - Export: (Recommended tutorial: java tutorial

How to export exe from java

2.Java——Runnable JAR file——Next

How to export exe from java

3. Select Configuration - Export Path - Dependent Library Form - Complete

How to export exe from java

There are three export forms of dependent libraries here:

a) Extract required libraries into generated JAR means to extract the dependent jar into a class and throw it into the jar you generated. That is to say, the generated jar contains the decompressed file of the current package and the dependent jar. Unzip the file;

b) Package required libraries into generated JAR means to put the dependent jar directly into the generated jar without decompressing it, which means that the generated jar contains the dependent jar and is not decompressed;

c) Copy required libraries into a sub-folder next to the generated JAR means to put the dependent jar in the same directory where you generated the jar, that is to say, the dependent jar file is separated from the generated jar. Open under the build path.

Now you can find the generated jar file in the export path.

2. Convert jar files to .exe files

1. Install exe4j and run - next.

How to export exe from java

2."JAR in EXE" mode —— Next

How to export exe from java

3.Set the exported application short name—— —Export path—Next

How to export exe from java

4. Set the type of executable file—executable file name—icon file—Next

How to export exe from java

If you want to export a 64-bit executable file, you also need to set it up:

How to export exe from java

5. Add the jar file that needs to be converted—— Select the main class——Next

How to export exe from java

6. Set the jre version number range——Next

How to export exe from java

7.Next ——Next——Next.... Export completed

8. Running results

1How to export exe from java

If you want to run it on other computers, you must Make sure that jre exists, or directly copy jre to other computers to run.

The above is the detailed content of How to export exe from java. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template