install4j HelpDownload

How Installers Find A JRE


Installers generated by install4j are native executables or shell scripts and can start running without a JRE. However, the installer itself requires a JRE to perform its work and so the first action of the installer is to locate a JRE that is suitable for both the installer and your application. In this process it performs the following steps:

  1. Look for a statically bundled JRE. If a statically bundled JRE is included with the installer, it will unpack it and use it. First, this JRE is unpacked to a temporary directory. Later it is copied to the jre directory in the installation directory of your application. No other installer generated by install4j with a different application id will find this JRE. It will not be made publicly available, for example, in the Windows registry.
  2. Look for a suitable JRE in the configured search sequence. The installer uses the same search sequence and Java version constraints as your launchers which are configured for the entire project. The "Previous installations" search is only performed by the installer and searches for installations with the same application id. If it finds a JRE from a different installation directory, the "Install files" action will copy it as a private JRE to the current installation directory.
  3. If no JRE has been found, the installer notifies the user. If the "Search Windows registry and standard locations" entry is part of the search sequence, it will display information on how to alternatively provide a JRE or provide a "Locate" button on Windows.