Let's say that we are Sun Microsystems and we want to create a Windows Installer package for the well-known SwingSet2 Demo. 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).
- 1. Create project
- 2. Enter Product Details
- 3. Set Install Parameters
- 4. Add Installation Files
- 5. Define Java Products
- 6. Create program shortcuts
- 7. Build
- 8. Run, test and remove
1. Create project
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 swing2set.aip.
2. Enter Product Details

Please note that these details are completely fictive.
3. Set Install Parameters
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.
4. Add Installation Files
Go to the Files and Folders page by clicking on
“Files and Folders” on the left side page
menu.
Click on the toolbar button. Browse to where your JDK is
installed (something like C:\j2sdk1.4.2_01), then browse to and select
the Swing Set 2 folder (usually demo\jfc\SwingSet2). Click
.

5. Define Java Products
Go to the Java
Products page by clicking on “Resources” on
the left pane page menu.
Create a new Java Product
by clicking on the toolbar button. Let's
call it swing2set.

Click on the button and browse to and select the SwingSet2.jar file. Click OK.
Edit the Main class to: SwingSet2
Go to "Virtual Machine" tab and set the JVM parameters to: -Xms64M -Xmx256M
Back in the "Settings" tab specify the JRE version min and max to whatever version you have installed on your machine.
Select GUI Application. We don't put a splash screen, since SwingSet2 already has one.

Now a new file has appeared in the Files and Folders Page: swing2set.exe.
6. Create program shortcuts
Go to the
Files and Folders page by clicking on “Files and
Folders” on the left pane page menu.
Select the swing2set.exe file
and click on the toolbar button. Set the
name and description to: Swing Set 2. Find yourself a nice icon on
your computer (the DLLs and exes in Windows directory are full of
them). Click OK.

Repeat the operation, creating a shortcut for the ReadMe file. Name it ReadMe.

7. Build
Click on the
toolbar button.
8. Run, test and remove
Click on the
toolbar button to run and test the MSI you created. After installation
you should have a Swing Set 2 folder in your “Start” menu.
Run the Swing Set 2 Demo by selecting Swing Set 2.

To remove the installed package, simply Run it again and select Remove. That's it!
The End
This concludes our tutorial. To learn more, please read the Java Service Installation tutorial.