Package an eclipse application as an. exe

Source: Internet
Author: User

Transferred from: http://blog.163.com/loveshijie_1991/blog/static/1760553112012102573437156/

To finish the work, we need to take two steps.

1. Package Eclipse's class file as a jar file

2. Package the jar package and the generated files under eclipse such as JRE, class, etc.

Here's the first step:

(Package eclipse's class file as a jar file package)

1. Click Workspace--"Export--" JAR file

since we're talking about packaging jar generation EXE, choose "jar in EXE" mode, which can package a Java application into an EXE file, but cannot package additional files except jars. Then >>next

3. Application info-configuration information for the generated application

set the name of your application and the output folder of the executable file that will be generated. Then >>next.

4.Executable Info-Configure parameters for an executable file

The type entry is based on the types of your program, which is the GUI program, followed by the file name, the icon for the executable file, whether to allow only one application to run at the same time, whether to throw an exception when the main thread is wrong, or to change the working directory (relative to the executable). Then click >>advanced options>>version Info

5.version info-setting version information


6.java invocation-Configuring the operating environment


first configure the class path, delete the original configuration in this item, then click "+" to find the jar file you generated.


then at the top of the general Midpoint browse button, EXE4J will automatically find your application's entry-main class.
in the advanced options below choose native Libraries settings, this function is to add your application to the external jar package file, this I have been useless, because I do everything like to concentrate, so in the application of all the external package integrated into the jdk/ JRE, so in the client installation program as long as the program directly to him to test the past can be used, no more installation of other things, they will like Oh, after all, the user is not programming.

7.jre-Configuring the JRE

Configure your JRE version type here, and then look at >>advanced option>>search sequence


here to configure the location of the jre/jdk you need to run the program, if you just package after the machine run, directly assigned to your native JRE/JDK directory, if your package after the program to run on another client, and the machine is not installed JDK, then we will think of another method. From the customer's point of view, get the software in the installation process should be as few as possible to the customer to bring cumbersome installation matters, it is best to click the mouse can be installed automatically. Therefore, we want to let the user save the trouble of installing JDK. To solve this problem, we can place the installed JDK copy in the root directory of the final product and add the JDK copy to the running environment of the program.

Search Registty can scan the installed JDK/JRE, we select Directory, specify a JDK directory for the program, just navigate to the JDK root directory, such as. Then >>next
It is important to note that the program developed with Eclipse is just one JRE, and the JDK does not, so I'm wrapping the JRE into the EXE runtime, so the option under Java version that allows the JRE beta to be used will be selected.
8.preferred vm-Select a virtual machine

This is based on the specific case, this example is client. Then >>next

9.splash Screen-pre-loaded form

you can set up your pre-loaded form interface here, but as if you only have a GIF-type image, status line and version line can adjust its display position in the position text lines visually preview screen. Then >>next, then choose the language interface, according to their own situation to choose. Then >>next

10.compile executable-Compilation build executable file

Auto Jump to:

You can click here to run the generated executable file, or you can save the configuration scheme for later use.

Package an eclipse application as an. exe

Related Article

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.