Let's say that we want to create a Windows Installer package for the included Java Product example. This tutorial will present in detail how to achieve this goal. In order to replicate it on your own machine, you need to have a Sun JDK installed (the latest version is recommended).
Before you start the tutorial download and unzip the Java Product Example. It contains all the files necessary to accomplish this tutorial, including a sample Advanced Installer project.
- 1. Create project
- 2. Enter Product Details
- 3. Set Install Parameters
- 4. Add Installation Files
- 5. Define Java Products
- 6. Create program shortcut
- 7. Build
- 8. Run, test and remove
Start Advanced Installer by selecting it from the “Start” menu. Launching Advanced Installer automatically starts a new installation project. Choose “Java” > “Java Application” as the project type.
A good idea is to save and name the project at this point. Use the “Save” menu item under the “File” menu or the Ctrl+S keyboard shortcut and let's name it JavaProductExample.aip.
Please note that these details are completely fictive.
Get to the Install Parameters page by clicking “Install Parameters” on the left side page menu. We won't change anything here, leaving everything to their default values.
Go to the Files and Folders page by clicking on “Files and Folders” on the left side page menu.
Click on thetoolbar button. Browse to where your downloaded the example folder, then select DemoJar.jar file. Click .
Go to the Java Products page by clicking on “Resources” on the left pane page menu.
Create a new Java Product by clicking on thetoolbar button. Let's call it Java Product Example.
Click on the OK.button and select the DemoJar.jar file. Click
Edit the Main class to: DemoMainClass
Go to "Virtual Machine" tab and set the JVM parameters to: -Xms64M -Xmx256M
Specify the JRE version min and max to whatever version you have installed on your machine.
Back in the "Settings" tab select GUI Application. Optionally set a splash screen for your java product.
Now a new file has appeared in the Files and Folders Page: Java Product Example.exe.
Go to the Files and Folders page by clicking on “Files and Folders” on the left pane page menu.
Select the Java Product Example.exe file and click on the OK.toolbar button. Set the description to: Java Product Example Application. Find yourself a nice icon on your computer. Click
Click on thetoolbar button.
Click on thetoolbar button to run and test the MSI you created. After installation you should have a Java Product Example folder in your “Start” menu. Run the application by selecting Java Product Example.
To remove the installed package, simply Run it again and select Remove. That's it!
This concludes our tutorial. To learn more, please read the Java Service Installation tutorial.