EPFL
Faculty I&C
Master of Science in Computer Science
Semester Project
Winter Semester, 2006/07
Asheesh Gulati
Creating installers for Java applications
supervisor
David Portabella
professor in charge
Dr. Martin Rajman
LIA
[Laboratoire d'Intelligence Artificielle]
Creating installers for Java applications Asheesh Gulati
Table of Contents
1 Introduction..................................................................................................................................... 3
1.1 Software installation.................................................................................................................. 3
1.2 Aim of this study........................................................................................................................4
2 Platform-specific tools.....................................................................................................................5
2.1 Microsoft Windows Installer..................................................................................................... 5
2.2 Linux package management systems.........................................................................................5
2.3 MacOS X Installer..................................................................................................................... 6
3 Available solutions...........................................................................................................................6
3.1 Installers generators................................................................................................................... 6
3.1.1 Inno Setup.......................................................................................................................... 6
3.1.2 InstallAnywhere Now........................................................................................................ 6
3.1.3 InstallBuilder......................................................................................................................7
3.1.4 IzPack.................................................................................................................................7
3.1.5 Nullsoft Scriptable Install System......................................................................................7
3.1.6 Spoon Installer................................................................................................................... 7
3.1.7 VAInstall............................................................................................................................8
3.1.8 WiX....................................................................................................................................8
3.2 Executable wrappers.................................................................................................................. 8
3.2.1 JSmooth..............................................................................................................................8
3.2.2 Launch4j.............................................................................................................................8
4 Explored approaches.......................................................................................................................9
4.1 Application launchers................................................................................................................ 9
4.1.1 Java Archive.......................................................................................................................9
4.1.2 Multi-platform launcher using One-JAR......................................................................... 11
4.1.3 Windows launcher using Launch4j..................................................................................12
4.2 Installer programs.................................................................................................................... 15
4.2.1 Installers for Windows, Linux and MacOs using InstallAnywhere Now........................ 16
4.2.2 Windows and Linux installers using VAInstall............................................................... 20
4.2.3 Multi-platform installer in JAR format using IzPack...................................................... 21
4.2.4 Windows installer using IzPack + 7-Zip..........................................................................24
4.3 Java Deployment......................................................................................................................25
4.3.1 Web Start..........................................................................................................................26
4.3.2 Applet...............................................................................................................................30
5 Comparison table...........................................................................................................................32
6 Conclusion...................................................................................................................................... 33
7 References...................................................................................................................................... 33
7.1 Executable wrappers................................................................................................................ 33
7.2 Installers generators................................................................................................................. 34
7.3 Java Deployment......................................................................................................................34
7.3.1 Applets............................................................................................................................. 34
7.3.2 Web Start..........................................................................................................................35
2 / 35
Creating installers for Java applications Asheesh Gulati
1 Introduction
Installation (or setup) of a program is the act and the effect of putting a program in a computer
system so that it can be executed.
1
This process can be as simple as unpacking and copying on the local disk the files required by the
application, or a lot more complex, taking into account customized settings and configuration of the
computer in order to have the application operate correctly.
Because the requisite process varies for each application and each computer, many software come
with an installer – a dedicated program which automates most of the work required for their
installation.
1.1 Software installation
The installation phase is the first contact the user has with the application, and it is very important
that this first contact be as seamless and natural as possible.
There are two points every « good » installer should take care of:
1) the user should know at all time what is exactly going on, especially in case of unexpected
situations
2) the user should always be in total control of the installation process
Thus the installer has to be, in some way, intelligent, as to allow the user to complete his objective,
i.e. to have the application working on his computer, and to avoid unnecessary complicated steps
preventing him to reach this goal.
This can become quite difficult if the software requires other applications to be already installed on
the user's system. In this case, should the installer automatically try to install these third-party
software or just ask the user to do so himself before continuing?
Another consideration is the platform on which the application is going to be installed. Generally,
software are intended to be run on multiple platforms, creating the need to provide an installer for
each of them.
Finally, the installer should display a language the user understands, thus the need to address the
localization problem.
1 cf. http://en.wikipedia.org/wiki/Installer
3 / 35
Creating installers for Java applications Asheesh Gulati
1.2 Aim of this study
While big companies can make their own installer, or use a commercial solution to make one, there
are lots of small projects composed of only few developers with no time to create an installer for
their application or investigate available solutions. Very often, they simply do not provide an
installer, which is a pity: this means that lots of users won’t use their application, even if it is great,
because it is not easy to install.
This project tries to present an overview of the solutions available to create installer programs for
applications written in Java. As a concrete example, the ECatalog application will be used for
illustrating the solutions revised in this study.
ECatalog is a database front-end that provides trade-off analysis to the user during the search.
ECatalog can access Apache Derby (embedded and selected by default) and MySQL databases.
ECatalog has been developed at the Artificial Intelligence Laboratory at EPFL. More informations
about the project are available on the SourceForge page http://ecatalog.sourceforge.net.
An installer for ECatalog must have the following features:
● check if a JRE meeting the version requirements is available on target system; if not, inform
the user and (optionally) install one automatically
● install ECatalog on target system
● provide an uninstaller
● (optional) present MySQL as an alternative to Derby; if MySQL is not available on target
system, install it automatically and configure ECatalog to use it
● (optional) on Windows platform, present Microsoft Access as an alternative to Derby; if the
driver required to connect to Microsoft Access databases is not available on target system,
install it automatically and configure ECatalog to use it
● (optional) provide a means to transparently update ECatalog when a new version is released
Target platforms are Microsoft Windows and Linux systems, and MacOs when possible.
A CD containing all source and build files for the solutions reviewed in section 4 of this study has
been made available.
4 / 35
Creating installers for Java applications Asheesh Gulati
2 Platform-specific tools
2.1 Microsoft Windows Installer
The engine used for the installation, maintenance, and removal of software on modern Microsoft
Windows systems, called Windows Installer, supports installation packages in MSI format. An MSI
package contains the installation information, and often the program files themselves.
Windows Installer's features include a GUI framework, automatic generation of the uninstallation
sequence and powerful deployment capabilities, and make it a viable alternative to stand-alone
installer programs.
Quite a few commercial solutions can generate MSI installation packages as well as their own
proprietary installer programs:
● Altiris Wise Installation (http://www.wise.com )
● Lindersoft SetupBuilder (http://www.lindersoft.com )
● Macrovision FLEXnet InstallShield & InstallAnywhere (http://www.macrovision.com )
● ScriptLogic Desktop Authority MSI Studio (http://www.scriptlogic.com)
2.2 Linux package management systems
A package management system is a collection of tools to automate the process of installing,
upgrading, configuring, and removing software packages from a computer.
2
Each Linux distribution has its own package management system:
● Advanced Packaging Tool (APT), used by Debian/GNU Linux and its derivatives
● Autopackage, a complementary package management system that can be installed on any
distribution and intended to be used for managing non-core applications
(http://autopackage.org)
● Portage and Paludis (http://paludis.pioto.org), used by Gentoo Linux
● RPM Package Manager, originally Red Hat Package Manager, developed by Red Hat for
Red Hat Linux, now used by many Linux distributions (http://www.rpm.org)
Additionally, Alien (http://kitenet.net/~joey/code/alien.html) allows to convert a package format to
2 cf. http://en.wikipedia.org/wiki/Package_management_system
5 / 35