Package EXE for Java program with INSTALL4J tool
Producer: Mark
Production Time: 2013-05-02
?
- Use Eclipse to package the source of the program into a jar file.
Packaging jar Method I do not introduce, I believe everyone will, will not Baidu a bit.
- Ready to work.
The jar package that will be exported: Aaa.jar, the picture that the program needs: images, database, and the PNG image of the icon after you want to generate the EXE file, copy all to a SMMs folder below.
- Open the installed install4j file
Enter the full name of the program, the program short name, version number, and then click the blue arrow in the upper-right corner for the next step.
?
- Enter the minimum version number of the JRE, which can be up to null. Because previously packaged other source code, and installed JRE so in the following JRE search results (red silk border) will appear in the JRE environment, the initial packaging is not. Click the arrow in the upper right corner to proceed to the next step.
- Select the language and click the upper-right arrow to proceed to the next
?
- In the red box, set the file to store the path, click the upper right arrow to proceed to the next step.
- Click Next to the Files screen in succession, click Add Files (red box)
?
- After clicking Add files, if you are packaging a separate file, select single Files,next to Next
- Click the green plus sign to add the files you want to package.
- Select the desired jar package
- Always click Next to the finished interface, then click OK.
- You can see the jar file that you just introduced
- Because our program requires a database and pictures, we also need to take these in. So first set up two folders images and database. First import the picture, mouse select images, click Add Files
- Select Directory here, because the entire picture folder is imported directly.
- Find the path to the picture
?
?
?
- Keep clicking next to the finished interface, click OK
- You can see the path of the picture you just imported, then select Database, click Add Files,
The same approach to importing database
- Import successfully, click the upper right arrow to proceed to the next step
- After clicking next to this screen, click the green plus sign,
Then select all files in the distribution tree and then the upper right arrow to proceed to the next step.
- Double-click New laucher
- Select the first generated launcher and click Next
- In executable name, enter the name of the EXE file to be generated, and install the red box selection. Click Next
?
- Here is the icon to set the startup file after the build EXE file is installed, click Next
- The first step is to select the Green plus sign, add jar files and pictures, database
- Select Archive and select Aaa.jar, point Ok,ok
- You can see the imported JAR file, and then continue to click the Green plus sign to import pictures and databases
- Select Directory, check images, point Ok,ok
- Import the database in the same way, then select Main class, then next
- Leave the default, click Next
- Finished, OK
- Click the arrow in the upper right corner, next
?
- Continuous point next to Installer's actions interface, select Create program group,
Then select the Windowsèprogram group name setting to generate the name
(ie: start = = "All programs are seen after the program group name)
?
?
?
- Successive next next, enter the media interface,
Double-click New Media file
?
- Installer Select Windows, then next next
- Enter ${compiler:sys.fullname} in the first text box, meaning the full name of the file. Enter the path to the software you want to install in the text box below, which is empty. Click Next
- Click Next to step Sixth, select the JRE environment, because I have the JRE installed on my machine, so I choose the first item,
Then next
The most important step:
In general, we all need to pack the JRE in, otherwise, other client installation, if no JRE program can not run, so we choose the second, and then put the JRE in, the tool also provides download JRE, is a lite version.
Click Download JREs, in your install4j installation directory, will be more than a JREs folder, the inside of the compressed files extracted, and then this interface configuration can be
- In the seventh step, choose Exclude files,
In the window you can filter the files that do not need to be generated, select No build, continue clicking Next
?
?
- To Finished interface point OK
- Click the upper right arrow to proceed to the next step
- First point to Test Build, and so on after execution,
- If you don't get an error, click Start Build
Open the SMMs folder to see the EXE installation file just generated
Now install it, test it.
Open it and look.
Completed the
?
—————————————————— The following is blank —————————————————
INSTALL4J tools to package EXE for Java programs