install4j Features
install4j comes in two editions, the Multi-Platform Edition and the Windows Edition.
To check out the differences between the two editions please see the edition comparison.
install4j offers the following features:
-
32-bit WindowsThe native installer executables generated by install4j run on Windows Server 2012/2016/2019/2022, Windows 7, 8, 10, and 11. As a fallback, ZIP archives can be created that contain the distribution tree and the generated launchers.
-
64-bit WindowsBesides the default 32-bit installers for Windows, install4j can generate 64-bit installers for the 64-bit versions of Windows Server 2012/2016/2019/2022, Windows 7, 8, 10, and 11. 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.
-
Windows ARMIn addition to the 32-bit and 64-bit x86 architectures, you can choose the arm64 architecture on the "Installer options" step of the Windows media wizard. With native ARM support, your application will run much more quickly than as an x86 binary in the emulated mode.
-
macOSAll macOS versions starting with macOS 10.12 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.
-
UnixFor 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.
-
Linux RPM and Deb PackagesRPM 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.
-
Easy to use IDE for designing installersThe 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.
-
Powerful built-in script editorScripts 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.
-
Code gallery with example scriptsTo 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.
-
Build from within the IDEProjects can be built directly in the IDE. Generated installers can be launched directly from the build console.
-
Command line compilerWith the command line compiler in install4j, you can integrate installer generation into arbitrary build processes.
-
Gradle, Ant and Maven integrationsinstall4j provides integrations for Gradle, Ant and Maven to enable easy installer generation in your build process. All build system plugins can auto-provide the appropriate version of install4j.
-
Build on any platforminstall4j can build media files for any supported platform on any supported platform.
-
Build debug installersinstall4j 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.
-
XML project fileA 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.
-
Project export to HTMLProjects can be exported to HTML for review, publishing or printing. All aspects of the project configuration are exported.
-
Freely define your distribution treeTo 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.
-
Configure multiple installation rootsBesides 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.
-
Configure multiple file setsIf 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.
-
Use compiler variables in the distribution treeWith compiler variables, you can adjust the distribution for each media files by overriding variables in the media file wizard.
-
Handle platform-specific differencesinstall4j offers convenient include/exclude mechanisms that let you tailor your distributions in a platform specific manner.
-
Define file rights for Unix, Linux and macOSFor each element in the distribution tree, you can define custom access rights for installation on Unix-like platforms.
-
Define fine-grained uninstallation policiesFor 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.
-
Define fine-grained overwrite policiesFor 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.
-
Define a tree of installation componentsYou 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).
-
Customized JRE/JDK detectionThe 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.
-
Flexible classpath constructionThe 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
NoClassDefFound
exceptions later on. -
GUI and console launchersFor regular applications, install4j generates GUI launchers or console launchers with an associated terminal window.
-
Service launchersinstall4j 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.
-
Custom working directoryIf 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
MYAPP_HOME
-
VM parameters fileFor 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.
-
Enforce single instance on WindowsOn 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.
-
React to file association startups on macOSOn macOS, you can use the launcher API to be notified when a user invokes a file association and your application is already running.
-
Windows version info resourceinstall4j 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.
-
Configurable execution level for Windows 7, 8, 10 and 11On Windows 7 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.
-
Custom script for Linux/Unix launchersOn 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.
-
Splash screenFor 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.
-
Redirection of stderr and stdoutThe 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.
-
Startup failure detectionNo 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.
-
Custom iconInstall4j 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 .desktopfile is created with the specified icon that allows users to easily create further shortcuts on their desktops and start menus.
-
Application bundle on macOSWith 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.
-
Support for Java 8 up to the current versionInstallers generated by install4j run with at least Java 7 and up to the current Java version, depending on the minimum project requirements that you configure in the install4j IDE.
-
LZMA and Pack200 compression algorithmsWith the optional LZMA compression algorithm, you can achieve the best compression ratios available on the market.
-
GUI installer modeinstall4j 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.
-
Console installer modeEvery 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.
-
Unattended installer modeEvery 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.
-
Unified screen and action configuration for all installer modesGUI, console and unattended modes all use the same screen and action configuration. This saves time when developing and testing the installer.
-
Response files for installersInstallers 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.
-
Code signing supportinstall4j offers support for signing Windows and macOS media files on all build platforms. macOS notarization is provided on all supported platforms. Code signing keys can be provided as files or on an HSM via PKCS #11.
-
Localization into many languages
Supported languages for the installer wizard are:
- Chinese (Simplified)
- Chinese (Traditional)
- Croatian
- Czech
- Danish
- Dutch
- English
- Finnish
- French
- German
- Greek
- Hungarian
- Italian
- Japanese
- Korean
- Norwegian
- Polish
- Portuguese
- Portuguese (Brazilian)
- Russian
- Romanian
- Spanish
- Swedish
- Turkish
- Ukrainian
-
Language detection at runtimeInstallers 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.
-
Rollback if the installation fails or if the user cancelsAll 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.
-
Net installersSelected 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.
-
CD installersOptionally 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.
-
Configurable icon, window size and imagesTo 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.
-
Installer log fileAll 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.
-
Statically bundle a JREWhen 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. Update installers can reuse the JRE bundle of already installed previous versions.
-
Generate a suitable JRE bundle during buildinstall4j supports various JDK providers as a basis for creating JRE bundles. For modular applications, install4j will take the module graph of the application into account when linking the JRE bundle. Manual module requirements and adding JMODs is also supported.
-
Prepare your own JRE bundlesIf you require a JRE bundle other from a source other than the available JDK providers, 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.
-
Application IDEvery 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.
-
Suggest previous locationsIf the application has already been installed, the installer can optionally suggest the previously selected installation directory and the previous program group to the user.
-
Run the uninstaller for updatesWith the "Uninstall previous installation" action, you can run the uninstaller of the old installation in unattended mode before the new installation takes place.
-
Stop deployed servicesThe "Install files" action automatically stops running services before installing the new service executables.
-
Detect running instances of an applicationThe "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.
-
Create 'add-on' installersBesides 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.
-
Updater templatesAuto-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.
-
Auto-generated update descriptorFor 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.
-
Flexible update selection logicThe 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.
-
Updater APIWith 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.
-
Update schedule registryIf 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.
-
Custom installer applicationsIn 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.
-
Screens and action groupsYou 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.
-
Re-use of screens and actions with linkingYou 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.
-
Disabling of screens, actions and form componentsBy 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.
-
CommentsIn 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.
-
Quick searchThe quick search function in the screens & and actions tab makes it easy to search for screens and actions or their IDs.
-
Configurable screen sequence for installers and uninstallersThe 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 for common tasks
Standard screens are fully localized and serve a specific task:
- Welcome screen for the installer or uninstaller
- Installation directory selection
- Display a license agreement and ask the user to accept it
- Selection of installation type
- Selection of installation components
- Standard program group selection
- Configure file associations with generated launchers
- Configure services
- Display additional confirmations, like creation of shortcuts on the desktop
- Display progress of installation or uninstallation
- Display information in text or HTML format
- Finish screen for the installer and uninstaller
-
Configurable screens
Configurable screens are templates that you can use to visually program the installer together with actions.
- Screen with an image banner on the left side
- Configurable form with an image banner on the left side
- Configurable form
- Directory selection
- Program group selection
- Display text
- Display PDF file
- Display progress
All messages in configurable screens can be adjusted.
-
Form screens
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:
- Labels and spacers
- Option selectors like check boxes, combo boxes, lists, drop-down lists and radio button groups
- Sliders and spinners
- Directory and file choosers
- Password and text fields
- Formatted text fields
- Text areas
Form components have optional leading labels that are aligned for the entire form and are highly configurable.
-
Configurable action sequence for all screens
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.
-
Actions for scripting the installer or uninstallerinstall4j 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.
-
Desktop integration actions
install4j provides desktop integration actions for all supported platforms. They include:
- Adding desktop links on Windows, macOS and Unix desktops
- Adding executables to the startup folder on Windows
- Creating a quick-launch icon on Windows
- Creating file associations on Windows and macOS
- Creating a program group in the Windows start menu, start menu entries on Unix desktops and launcher links in common locations on Unix
- Registering an Add/Remove item in the Windows software registry
-
File operation actions
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:
- Copying files
- Moving files
- Deleting files
- Setting the modification time of files
- Creating symbolic links on Unix and macOS
- Configuring file access modes on Unix and macOS
- Configuring the owner of files on Unix and macOS
- Installing the contents of a ZIP file
- Changing Windows access rights
- Displaying a PDF file in a cross-platform PDF viewer
-
Options for the 'Finish' screen
Actions that are primarily intended for the "Finish" screen of the installer include:
- Executing a launcher
- Rebooting the computer
- Showing a URL in the browser
- Showing a file in the browser
- Showing a PDF file in a standalone cross-platform viewer
-
Registry and preference store modificationsinstall4j 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.
-
Service actionsinstall4j provides actions for installing, starting and stopping services.
-
Text file modifications
Several actions can be used to modify text files, including:
- Appending to or creating a text file
- Fixing the line feeds of text files
- Modifying text files with simple search/replace or with regular expressions
-
XML file modificationsinstall4j 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 miscellaneous actions
Other actions include:
- Uninstalling previous installations
- Adding VM options to an installed launcher
- Modifying the classpath of an installed launcher
- Modifying environment variables in Windows
- Requiring an admin user
- Executing an arbitrary executable
-
Compiler variablesMost 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.
-
Installer variablesWith 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.
-
Launcher variablesinstall4j defines a number of magic launcher variables that you can use to adjust VM parameters and arguments for your launchers.
-
Localization keysFor 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.
-
Installer and uninstaller contextThe 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.
-
General servicesThe 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.
-
Platform-specific servicesSeveral platform specific services such as access to the Windows registry or Unix-specific file system operations are exposed in the API.
-
Installer eventsYou 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.
-
Framework for screens, actions and form componentsYou can quickly implement your own screens, actions or form components by using the appropriate framework in the API (see "Extensibility" below).
-
JavaBeans frameworkYou 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).
-
JavaBeans extension modelAll 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.
-
Easy integration of custom codeIn 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.
-
ExtensionsYou 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.