|
The following properties of the executable can be edited in the
Executable section of this step:
-
Executable type
Executables created by install4j can be either GUI applications, console applications or
service applications
-
GUI application
There is no terminal window associated with a GUI application.
If stdout and stderr are not redirected (see the
redirection advanced step),
both streams
are inaccessible for the user. This corresponds to the behavior of
javaw(.exe).
If your GUI application uses SWT instead of Swing, please select the
uses SWT check box below this radio button. This is mainly
important for correct behavior on Mac OS X where the application must be started differently in
this case. The executables on Microsoft Windows always include the XP manifest, so that on Windows XP,
SWT applications are displayed in XP style and not in Windows 2000 style.
-
Console application
A console application has an associated terminal window.
If a console application is opened from the Windows explorer, a new terminal
window is opened.
If stdout and stderr are not redirected (see the
redirection advanced step),
both streams are printed on the terminal window. This corresponds to the behavior of
java(.exe).
-
Service application
A service runs independently of logged-on users and can be run even
if no user is logged on. A service cannot rely on the presence of a console,
nor can it open windows. On Microsoft Windows, a service executable will be compiled
by install4, on Mac OS X a startup item will be created and on Unix-like platforms
a start/stop script will be generated.
When you develop a service please note the following requirement:
The main method will be called when the service is started.
To handle the shutdown of your service, you can use the
Runtime.addShutdownHook() method to register a thread
that will be executed before the JVM is terminated.
For information on how services are installed or uninstalled, please see the
help on service options.
-
Executable name
Enter the desired name of the executable without any trailing .exe
or .sh.
-
Directory
Enter the directory in the distribution tree where the executable should be generated.
If you leave this field empty, the executable will be generated in the installation
root directory. You can select a directory from the distribution tree by clicking the
[...] chooser button.
-
Allow only a single running instance of the application
If you select this check box, the generated executable can only be started
once. Subsequent user invocations will bring the application to the front.
In the StartupNotification class of the
install4j launcher client API
you can register a startup handler to receive the command line parameters.
In this way, you can handle file associations with a single application instance.
This feature is only available on Microsoft Windows, on Mac OS X, single bundle media files
always behave this way.
-
Fail if an exception in the main thread is thrown
Executables created by install4j can monitor whether the main method
throws an exception and show an error dialog in that case.
This provides a generic startup error notification facility for the developer
that handles a range of errors that would otherwise not be notified correctly.
For example, if an uncaught exception is thrown during application startup,
a GUI application might simply hang, leaving the user in the dark about the
reasons for the malfunction. With the error message provided by the install4j
executable, reasons for startup errors are found much more easily.
-
Working directory
For some applications (especially GUI applications) you might want to change
the working directory to a specific directory relative to the executable,
for example to read config files that are in a fixed location. To do so,
please select the Change working directory to check box and
enter a directory relative to the executable in the adjacent text field.
To change the current directory to the same directory where the executable is
located, please enter a single dot.
|