Java program to generate exe Executable File detailed tutorial (text description), java Executable File

Source: Internet
Author: User

Java program to generate exe Executable File detailed tutorial (text description), java Executable File

The ava program is packaged into an exe executable file, which is divided into two steps.

Step 1: import a Java program into a Jar package through Eclipse or Myeclipse

Step 2: Use exe4j to generate the exe executable file by using the Jar package program

 

Step 1:

Generate a Jar package from a java program

The following is the Jar package exported from Myeclipse. First, select project "right-click"

Click "Export"

Select JAR file

Only check the src directory under the project. config and lib are the Jar packages required by the configuration file and program.

Click "next"

Select the Main method and click Finish.

 

Only warning, no need to pay attention.

Okay, until the Java program Jar package is generated in the previous step.

Step 1 is complete.

 

 

Now start the second step:

Exe4j encapsulates the Jar package in exe

First, create a folder under a drive letter. In this example, a Java folder is created on drive D, then, place the Jar package files required by the jre and program and the configuration files to be read by the Java program into the folder.

Okay. Now, first open the exe4j program.

Step 1: click "Next" without any operation"

Step 2: select the second "JAR in EXE" mode and click "next"

 

 

Step 3: click "next" after setting"

 

 

Click "next"

 

Click "next"

 

 

Click "next"

 

 

After setting the size and version number, click "Search sequence" on the right node"

Click "Green plus sign" and select "Directory" to add JRE. JRE is the first step to create the JRE in the folder.

 

The "7, 8, and 9" step is the default value. In step 10, follow the image

 

 

Click "Save as" to Save a local file without any need. Then, go to the path of the exe you saved in the second part and find your exe file.

It's done.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.