WebStart Wizard SDK Tutorial for Windows Users


CONTENTS

  1. Introduction: Webstart Install Wizards on Windows

  2. How should I package my product?

  3. What code do I need to write?

  4. Windows Step-By-Step Example: WindowsBuilder.java


1. Introduction: Webstart Install Wizards on Windows

It is easy to create a Webstart Install Wizard for installing products on Windows. Many products targeted for Windows are complex and involve installation, configuration, and testing. Through the use of a Webstart Wizard, you can be sure that your product will get installed correctly and easily, without any confusion.

You can create a product tree of Files, Start Menu Icons, READMEs, etc, and have the Wizard install using this tree as a description of what to install. Your tree can be built to be architecture-independent, so that it works on all operating system implementations, regardless of the architecture of the underlying machine.

2. How should I package my product?

For building wizards on Windows, your product is most likely a set of files and directories. Your product's files will be placed inside the wizard, along with the graphical support, ready to be shipped elsewhere.

You will be using the FileUnit class to represent collections of files within your product tree. This class can install sets of files into different places, depending on how you configure your product tree.

You can even write support for your own custom types of files using the Wizard API (see the InstallLeaf API). See WindowsBuilder.java for the source code to this sample.

This example only covers the file collection approach (standalone files).

3. What Code Do I Need To Write?

For simple install wizards, the only thing you need to write is the builder code. This is where you will specify the files that comprise your product. You can also customize various aspects of the install, such as the "About..." message contents, the exit warning, etc. The rest of the install is written for you in the InstallArchiveWriter superclass. A basic set of panels are provided for your wizard. The panel sequence is as follows:

For more complex installs, you would need to build your product tree yourself, as well customizing the wizard panel tree. This is what we will be doing in the WindowsBuilder below. The basic steps to creating a wizard are:

4. Windows Step-By-Step Example: WindowsBuilder.java

The following example builds a fictional product that consists of a set of files, and a start menu entry. The java source code will only be installed if the user is running Windows NT.

This concludes this Windows Tutorial. For more information on creating wizards for Windows, please visit our website at www.sun.com/solaris/webstart/wizards/.