Java Generation EXE file

Source: Internet
Author: User

The Java program is packaged into an EXE executable file, divided into two major steps.

The first step: MyEclipse a Java program into a jar package via eclipse or

Step two: Generate EXE executable by exe4j speaking jar package program

The first step is detailed:

Generating a jar package from a Java program

Here is the MyEclipse export jar package, first select the project "right click"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216363657.jpg "height=" 403 "width=" 620 "/>

Click "Export"

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216363658.jpg "/>

Select Jar File

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216363659.jpg "/>

Only the SRC directory underneath the project is checked, Config and Lib are the jar packages required for configuration files and programs

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216363660.jpg "/>

Click "Next"

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216363661.jpg "/>

After selecting the main method, click Finish directly

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216364062.jpg "/>

Just a warning, no concern.

OK, until the previous step, the Java program jar package was generated.

The first large-step operation is complete.

Now start the second big step:

EXE4J the jar package in EXE package

First set up a folder under a drive, this example is the Java folder set up in the D disk, and then the JRE and the program required by the jar package file and Java program to read the configuration file into the folder.

OK, now start, first open the EXE4J program

First step without action, click "Next" directly

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364263.jpg "Height=" 468 "width=" 620 "/>

Second step: Select the second "JAR in EXE" mode, then click "Next"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364364.jpg "Height=" 468 "width=" 620 "/>

Step three: When Setup is complete, click "Next"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364365.jpg "Height=" 468 "width=" 620 "/>

Click "Next"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364366.jpg "Height=" 468 "width=" 620 "/>

Click "Next"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364467.jpg "Height=" 468 "width=" 620 "/>

Click "Next"

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364468.jpg "Height=" 468 "width=" 620 "/>

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

Click "Green Plus" to select "Directory" to add Jre,jre is the first step in creating the JRE in the folder

650) this.width=650; "src=" http://files.jb51.net/file_images/article/201312/2013121216364469.jpg "/>

Then "7, 8, 9" Step by default, the tenth step, by the picture operation

650) this.width=650; "Title=" opens the picture "src=" in a new window http://files.jb51.net/file_images/article/201312/2013121216364470.jpg "Height=" 468 "width=" 620 "/>

After success, click the "Save as" button, just save a Place "save", this file is not used, and then to the second you save exe that path, find your EXE file.


Java Generation EXE file

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.