|
Launchers are responsible for starting your application. There are two types of launchers:
- Generated launchers
install4j can generate native launchers that start your application. For example, on Windows, a
.exe file will be created that among other things takes care of finding
a suitable JRE, displaying appropriate error messages in case of need and then starts your
application. Using launchers generated by install4j has
numerous advantages as compared to using home-grown batch files and shell scripts.
Each launcher definition is compiled separately for each defined
media set. Therefore, for the majority of all cases,
a single launcher definition will be sufficient to start your application. If, for example, your
distribution contains two GUI applications and a command line application, you have to define
3 launchers, regardless of how many media files you define.
When your application is started with a launcher generated by install4j, you can query the system property
install4j.appDir to get the installation directory and and install4j.exeDir
to get the directory where the launcher resides. Use System.getProperty("install4j.appDir")
and System.getProperty("install4j.exeDir") to access these values.
- External launchers
If you already have an external launcher for your application, you can let install4j use that
launcher instead of generating one. Since external launchers are most likely platform dependent,
you will have to add external launchers for each platform that is targeted by your
media files. Make sure to
exclude the irrelevant launchers
in your media file definitions in this case.
To define a new launcher, you double-click on the
new launcher entry in the list of defined
launchers or choose Launcher->New launcher from install4j's main menu.
The launcher wizard will then be displayed.
Once you have completed all steps of the launcher wizard, a new launcher entry will
be displayed in the list of launchers. The icon of a launcher indicates if it is a
- GUI application launcher
- Console application launcher
- Service application launcher
- External launcher
|