Exe4j tutorial, Inno Setup tutorial

Source: Internet
Author: User

The following is the startup interface of exe4j. Click Next to create a configuration file.


Next, select the type. We select the first option to ensure that the program still has cross-platform features. If you select the second one, you can fully compile the program into an EXE file, which can better protect your program from decompilation.

Next, set the short file name of your program, the source folder path (such as my: e: \ myloading), and the directory where the EXE file to be generated is stored, the EXE directory must be specified under the source folder. Here I will specify it as the root directory of E: \ myloading.

Next, you can name the EXE file to be generated, for example, my "myloading". You can also specify an ico icon for it. Others can be created by default ,:

In this step, we need to add the class paths used in the program. Then specify the startup class of the program. If other programs are not necessary, click the default class path and add the class path by +:

Basically, you need to add all the jar files you need. You can add them one by one, add the entire folder, or use system environment variables. In order to make your programs run everywhere, therefore, we recommend that you use relative paths instead of environment variables for strong columns. After adding your class path, return to the previous step and select your "Main class.

Next, select the JRE version required by our program, and then select our own JRE. This step is not required, but for better distribution program, we bring our own JRE, therefore, we must specify our built-in JRE as the preferred runtime environment. Select:
Search Sequence

By default, the program will go to the Registry, environment variables, and related directories of the system to find JRE. Because we only need the built-in JRE, I removed the default option here, then add the directory path where our own JRE is located, starting with "+:

The relative directory path is recommended here:

Specifies the directory where the JRE is located,

Finally, my JRE directory path is like this:. \ jre1.6

The next step is simply to add a startup screen to the program, and then follow the default next step.

The program finally generates the execution file: myloading.exe
Now, we can use our own JRE to start the program, but the entire program is still 40 MB in size.
Now we use Inno Setup to compress and create an installation package.

For the download and installation of Inno Setup, please search online. After installation, start the script Wizard ,:
The process is simple:

Specify the Startup File of your program, that is, the EXE file created with exe4j just now, and include your entire program directory, the next step is basically the next step until the script wizard is complete,



Then execute the script:




Find the default output directory of Inno Setup and you will be able to see the installation package after compilation, for example, myloadinginstaller .exe.
The size has reached 8.86 MB.

With this, you can quickly and easily install your Java Desktop Application.


An exe4j copyright prompt will be displayed when the EXE program made of unauthenticated exe4j is opened again. After registration, you can.

Exe4j registration code: L-g782dn2d-1f1yqxx1rv1sqd

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.