Best Java Installation Tool
install4j creates media files for all mainstream platforms:
The native installer executables generated by install4j run on Windows Server 2012/2016/2019, Windows 7, 8 and 10. As a fallback, ZIP archives can be created that contain the distribution tree and the generated launchers.
Besides the default 32-bit installers for Windows, install4j can generate 64-bit installers for the 64-bit versions of Windows Server 2012/2016/2019, Windows 7, 8 and 10. In this case, all generated launchers are 64-bit executables as well. 64-bit executables will run with 64-bit JREs on 64-bit Windows installations.
All macOS versions starting with macOS 10.5 are supported by install4j. The GUI installer installs your application as a proper application bundle on macOS. Also available is a folder-type installation, that supports application bundles for each launcher. Finally, the single-bundle archive for macOS offers the most convenient installation for simple distributions.
For Unix and Linux, install4j creates installers that run independently of the architecture on all POSIX-compliant systems with a Bourne shell. As a fallback, gzipped TAR archives can be created that contain the distribution tree and the generated launchers.
RPM and Deb files let your Java application be part of the most widely used package management systems on Linux. install4j supports pre-install, post-install as well as pre-uninstall and post-uninstall scripts for RPM and Deb media files.
install4j makes designing and building installers easier than ever:
The install4j IDE enables you to get started immediately, without the need to become an expert in installer software. Important hints are displayed directly in the IDE, the context sensitive help gives you background information.
Scripts in install4j are regular Java code. install4j's built in editor offers code completion for for both install4j API, JRE runtime classes and your own custom code. Context-sensitive Javadoc and instant problem analysis are available in the editor.
To get started with scripting, the code editor offers a code gallery that shows you example scripts for common problems. Also, the sample projects contain many scripts that show how scripting works in install4j.
Projects can be built directly in the IDE. Generated installers can be launched directly from the build console.
With the command line compiler in install4j, you can integrate installer generation into arbitrary build processes.
install4j provides integrations for Gradle, Ant and Maven to enable easy installer generation in your build process.
install4j can build media files for any supported platform on any supported platform.
install4j can optionally generate debug installers that are started from batch files and shell scripts. Debug builds enable you to start the installer and uninstaller directly from your IDE for debugging your custom code.
A project in install4j is saved to a single XML file. The file format is stable and ideally suited for version control. Advanced customizations or automatic generation of projects are possible by modifying or creating project files.
Projects can be exported to HTML for review, publishing or printing. All aspects of the project configuration are exported.
install4j's GUI allows you to:
To each directory in the distribution tree you can add the contents of entire directories or single files from arbitrary directories in your file system. The definition view and the results view give you full control over the files that will be distributed by your installers.
Besides the default installation directory, you can create additional installation roots. Installation roots can correspond to pre-defined "magic folders", like the Windows system directory or the user home directory. Alternatively, an installation root can contain installers variables that are resolved at runtime. This mechanism facilitates plugin installations and system extensions.
If you want to decide at runtime which files should be installed or if you need to ship alternative files for different configurations, you can create additional file sets in the distribution tree.
With compiler variables, you can adjust the distribution for each media files by overriding variables in the media file wizard.
install4j offers convenient include/exclude mechanisms that let you tailor your distributions in a platform specific manner.
For each element in the distribution tree, you can define custom access rights for installation on Unix-like platforms.
For each element in the distribution tree, you can specify a different uninstallation policy that tells the uninstaller under what circumstances a file should be removed. Special uninstallation policies are provided for updates.
For each element of the distribution tree, you can set a different overwrite policy that determines what install4j will do when it has to overwrite files during an installation. Special overwrite policies are provided for updates.
You can define groups of files and directories that constitute separate installation components. Installation components and component folders can be arranged into a tree. They can be assigned descriptions that the user can display in the installer to learn more about the installation components. In addition, you can configure dependencies between installation components. Installation components are the basis for installer data files and can optionally be downloaded on demand (see below).
install4j launchers have the following features:
The executable can detect appropriate Java JREs and JDKs on the target system. You can also distribute your own JRE on demand (see below). The search sequence, error handling and supported JRE/JDK versions are fully customizable.
The classpath for your Java application can be fully customized to scan directories
for JAR files, include specific directories and archives as well as insert environment
variables. Customizable error handling allows you to interrupt the startup sequence
with a helpful error message avoiding
exceptions later on.
For regular applications, install4j generates GUI launchers or console launchers with an associated terminal window.
install4j offers full support for generating and installing services (daemons). For services, install4j generates service executables on Windows, startup items on macOS and start/stop scripts on Unix/Linux platforms.
If required you can adjust the working directory to a specific directory relative
to the executable. This is especially helpful for console applications which
can be invoked from arbitrary directories. This way, you don't need to define
fragile environment variables like
For every executable, you can create a user editable VM parameters file (*.vmoptions). In this way, users can adjust VM properties like the maximum heap size. In the *.vmoptions file, you can also adjust the default classpath of the launcher. Everywhere where you can enter VM parameters, install4j supports the use of environment variables.
On Windows, you can optionally enforce that only a single instance of your application is running. The launcher API allows you to receive notification or further startups together with any command line parameters.
On macOS, you can use the launcher API to be notified when a user invokes a file association and your application is already running.
install4j can generate a version info resource entry in Windows executable. This version info is displayed for example in the property dialog of the Windows explorer. If you wish to obtain the "Designed for Windows" logo, this is an important requirement.
On Windows Vista and higher, executables run with restricted rights by default. install4j offers options to elevate the rights of your launcher executable to the highest available rights or to an administrator account.
On Linux/Unix systems you can optionally provide a shell code snippet that is run just before your application is started to make advanced modifications to your environment.
For GUI applications, a splash screen gives the users of your application an optimum feedback about application startup. Textual status information about application startup and version information can be freely placed on the splash screen. From within your Java code, this status information can be updated with a simple method call. With install4j's "auto-off" mode activated, the splash screen is hidden, as soon as your application displays a window. On Windows, the splash screen is native and is displayed immediately. Java 6 splash screens are also supported.
The standard output and error streams can be redirected to customized files. This gives you access to valuable information like an exception stack trace on stderr that would otherwise be lost for a Java GUI application. The files for stderr and stdout are only created when necessary, avoiding empty log files.
No more flashing terminal windows and GUI applications that hang without displaying anything. install4j executables can monitor the stderr output file and display a dialog with helpful information to inform about startup failures.
Install4j uses image files to create the icon for your launcher. Windows icons are created that are optimized for Windows 10 and have optimal display properties on older versions of Windows as well. You can also specify your own Windows icon file. On macOS, ICNS icon files are used. For Linux/Unix desktops, a .desktop file is created with the specified icon that allows users to easily create further shortcuts on their desktops and start menus.
With install4j, your applications become first-class citizens on macOS without the need for you to become a Mac expert. On macOS, install4j executables are part of a proper application bundle.
install4j creates installers with the following features:
Installers generated by install4j run with Java 7 - 13, depending on the minimum project requirements that you configure in the install4j IDE.
install4j generates professional-looking GUI installers with freely configurable screens and actions. Actions can be added to each screen, so you can visually program your installer in the install4j IDE. Equally configurable uninstallers are generated automatically for each installer.
Every GUI installer optionally supports console installations, where the installer screens are displayed on the terminal. All pre-defined screens and actions in install4j support console mode. The same applies to uninstallers. This is especially useful for installations on headless Unix/Linux servers.
Every GUI installer optionally supports unattended installations and uninstallations, where the installer and uninstaller perform the installation automatically and silently without any user input. All pre-defined screens and actions in install4j support unattended mode.
GUI, console and unattended modes all use the same screen and action configuration. This saves time when developing and testing the installer.
Installers can save user input to an editable response file. In subsequent installations, this response file can be used to pre-define user input or change default settings. This is especially important for unattended installations, but works also for GUI and console installer modes.
install4j offers support for signing Windows and macOS media files on all build platforms. Automation for macOS notarization is provided when the build runs on macOS.
Supported languages for the installer wizard are:
Installers can be configured to support multiple languages and offer the user to select a language when the installer is started. The language selection dialog can optionally be skipped if the runtime locale matches a configured language.
All pre-defined actions in install4j offer full rollback of their modifications. Additionally, it is possible to define rollback barriers, so that partial rollbacks or no rollbacks are performed when the user cancels the installer wizard.
Selected installation components can be downloaded on demand, so that the download size of the installer becomes smaller. In this way you can handle rarely used components or prepare net-installers that download all installation components.
Optionally the installer data files can be external files rather than being included in the installer. This is useful for CD installers. so that the startup of the installer is as fast as possible and only the data files for the selected installation components are accessed on the CD.
To customize the appearance of your installers and uninstallers, you can specify a different icon for the installer, change the default window size and replace the default images in the installer with your own images.
All screen changes and executed actions are written to the installer log file with some actions providing more fine-grained logging, like the "Install files" actions.
With install4j, you can:
In this way the size of the installer is not increased by the inclusion of a JRE. On the target system, if no suitable JRE can be found, the user is prompted whether to download the JRE bundle from your site.
When defining a media file in install4j, you can select a JRE for bundling. The JRE will be distributed by the installer and used by all the generated launchers. The JRE download wizard in install4j makes it easy to download suitable JRE bundles from ej-technologies' JRE server.
You can tell install4j to install a JRE in such a way that other installers created by install4j will find that JRE. The JRE will then be installed to a shared location and not into the installation directory. If you configure a dynamically bundled JRE for multiple installers, the JRE will be downloaded only for the first installer.
If you require a JRE bundle that is not available from ej-technologies' JRE server, you can use the "Create a JRE bundle" wizard to create a JRE bundle from any JRE in your file system. For 1.8 JREs, JAR files are packed with the Pack200 compression algorithm.
install4j actively handles updates of your installations:
Every project has a unique application ID that enables JRE to detect update installations. You can also use the application ID in the installer API to get information on existing installations.
If the application has already been installed, the installer can optionally suggest the previously selected installation directory and the previous program group to the user.
With the "Uninstall previous installation" action, you can run the uninstaller of the old installation in unattended mode before the new installation takes place.
The "Install files" action automatically stops running services before installing the new service executables.
The "Install files" action detects if instances of GUI or console launchers are still running and asks the user to close them before continuing with the installation.
Besides regular installers, install4j can create "add-on" installers that will only install their distribution tree on top of another installation with a specified application ID. This makes it easy to distribute patches for your installations.
install4j provides flexible auto-update functionality for your applications:
Auto-updaters need a lot of flexibility to accommodate your specific needs. install4j allows you to customize every aspect of an updater. Several standard updater templates are available. You can add multiple updaters to your project, if there are different scenarios such as a standalone updater and an updater with a silent background check.
For every build, install4j creates an update descriptor that you can place on a web server to communicate updates to your users. The update descriptor can be customized to restrict updates to certain installed versions or to transmit comments to the updater.
The logic how an update installer is selected by the updater is not hard-coded. The updater templates contain scripts that can be edited to create more complex update scenarios.
With the updater API you can check for updates in your own application code. In addition, you can invoke updaters from your application and react to shutdown requests as a new version is installed.
If you would like to check for updates on a a regular schedule, the update schedule registry API makes it easy to do so in your application code. Also, a special form component is available for letting the user configure the update schedule in the installer.
The screens & actions tab is the center-piece of the install4j IDE and features:
In install4j you can not only configure a fully flexible screen and action flow for installer an uninstaller, you can also create custom installer applications that are part of your installations. Custom installer applications look like installers and can use all available screens and actions. If you want to execute certain parts of the installer after the installation, you do not have to code them yourself again in your application.
You can organize screens and actions into groups to clarify the screen and action flow. Groups have common condition expressions and optional loop expressions. This is especially important for large projects where the amount of screens or actions in the installer is otherwise not manageable.
You can link to screens and actions as well as to screen and action groups in any part of your installer or custom installer applications. In this way, you can re-use parts of the installation sequence in a custom installer application or construct multiple installation sequences without copying your screen and action definitions.
By disabling screens, actions and form components, you can effectively comment them out. This makes it easier to develop installer projects as you can quickly build partial installers or add elements for debugging purposes.
In large projects or projects that need to be documented, it is important that the documentation is attached to the definition. In install4j, you can add optional comments to screens, actions and form components. Keyboard accelerators allow you to quickly move between all your comments.
The quick search function in the screens & and actions tab makes it easy to search for screens and actions or their IDs.
install4j's screen system offers:
The screen sequence for installers and uninstallers can be configured in an arbitrary sequence drawing from the pre-defined screens in install4j, screens contributed by installed extensions or your own screens contained in the configured custom code locations.
Standard screens are fully localized and serve a specific task:
Configurable screens are templates that you can use to visually program the installer together with actions.
Form screens are the most flexible screens in install4j that allow you to quickly configure arbitrary installer or uninstaller screens. Form screens contain a number of form components that are aligned along the vertical axis. You can chose from a wide range of form components:
install4j's action system offers:
Actions can be added to each configured screen and are executed when the user moves to the next screen. This allows you to program the installer visually in the install4j IDE by wiring together screens and actions. install4j offers a wide range of pre-defined actions. Actions can also come from installed extensions or the configured custom code locations.
At the heart of the action system are the "Install files" and "Uninstall files" actions that take care of the distribution tree, taking into account the user selection of installation components and downloading installation components if necessary.
install4j provides actions that can change the state of the installer or uninstaller. These actions include running scripts, setting installer variables and configuring the state of the progress bar.
install4j provides desktop integration actions for all supported platforms. They include:
For file modification and installation actions that cannot be handled with the configuration of the distribution tree, a number of file operation actions are provided including:
Actions that are primarily intended for the "Finish" screen of the installer include:
install4j provides actions for modifying the Windows registry and the Java preference store. Keys and values in the Windows registry and nodes and keys in the Java preference store can be deleted, created or changed. On Windows, you can change access rights for registry keys.
install4j provides actions for installing, starting and stopping services.
Several actions can be used to modify text files, including:
install4j offers actions to modify XML files, such as applying an XSLT transform to an XML file or to replace text in selected nodes in an XML file. These actions are especially useful for deploying to Java EE containers.
Other actions include:
install4j has several variable systems:
Most text fields in the install4j IDE support compiler variables. With compiler variables you can override settings for each media file as well as change settings from the command line or ant task. Compiler variable values can also be queried in the installer and uninstaller.
With installer variables you can wire actions and screens together. Form components in configurable form screens save their user input to installer variables that can then be used in other screens or actions. With the "Set a variable" action, you can execute a script to calculate the value of a variable. That variable can then be used in properties of screens, actions and form components.
install4j defines a number of magic launcher variables that you can use to adjust VM parameters and arguments for your launchers.
For each configured language, you can specify a custom localization file. You can use the keys in those files to localize your own messages in the installer and uninstaller as well as to override any default messages in install4j.
install4j offers a rich API for installers and uninstallers:
The context objects are frequently used in code snippets that you enter directly in the install4j IDE. They offer access to important installer or uninstaller functionality.
The API in install4j offers several utility classes that give access to information about installed applications, system information not available in the default JRE libraries, locations of installed JREs and JDKs as well as the status of installed services.
Several platform specific services such as access to the Windows registry or Unix-specific file system operations are exposed in the API.
You can register installer event listeners in the API to be informed about all action executions, screen changes, file installations and life-cycle events in the installer or uninstaller.
You can quickly implement your own screens, actions or form components by using the appropriate framework in the API (see "Extensibility" below).
You can optionally enhance your screens, actions and form components with bean info classes according to the JavaBeans specification in order to make them configurable in the install4j IDE. The API provides a framework that exposes and documents the relevant properties (see "Extensibility" below).
install4j is extensible:
All screens, actions and form components in install4j - including the pre-defined elements - use the installer API and the JavaBeans specification to present configurable properties to the user. With the rich installer API you can create new beans that are first-class citizens in the install4j IDE. The JavaBeans part is optional, so creating new screens, actions and form components that are not configurable is very straight-forward.
In the install4j IDE you can configure custom code locations that can contain your own implementations of screens, actions and form components. When you add a new screen, action and form component, you can always choose to search the custom code for appropriate classes.
You can easily bundle your JavaBeans into extension JAR files. Extension JAR files that are placed into the "extensions" directory of an install4j installation are picked up automatically and have their beans inserted into the appropriate registries. If the user uses a contained bean, the extension is automatically deployed to the installer.