ative Windows installers offer unparalleled integration with the operating system, as well as a familiar installation process for your usersthey just double-click on the installer, click Next a few times, and then click Finish. In this 10-Minute Solution, you will learn how to build a native Windows installer for an SWT application using open source tools. The primary advantage of open source tools like the Nullsoft Scriptable Install System (NSIS) relative to commercial tools like InstallShield is the purchase pricefree.
This article assumes that an SWT application has already been built and runs fine on the developer's machine. The sample application included in the downloadable code is a simple text editor namedwhat else?SimpleText (see Listing 1). This discussion follows a step-by-step procedure that generates an executable Windows installer (see Figure 1) that can install SimpleText in the client's
Program Files directory, add Start Menu shortcuts, and uninstall the application.
|Figure 1. A Screenshot of the SimpleText Installer|
Most of the steps described below are relevant to any Java developer looking to create a Windows installer for his or her application. However, the specific build environment for SimpleText is JDK 5.0 (a.k.a. 1.5) and Eclipse 3.1.
You want to create a Windows installer for your Java SWT application.
Create an executable JAR, then use free, open source tools like NSIS and png2ico to create an executable installer for Windows.