General Settings - Java Version


  On this tab of the General Settings step you enter the version requirements and the search sequence for the JRE or JDK that apply to your installers and application launchers.
  In the Java version section, you can constrain the version of the Java VM.
  • The minimum Java version must be specified. For example, enter a value of 1.8.
  • The maximum Java version can optionally be specified. For example, enter a value of 9.0.
The maximum Java version can be entered with less numeric detail than the minimum Java version to prevent the use of a higher major or minor release. For example, a minimum version of 1.4.1 and a maximum version of 1.4 ensures that the highest available 1.4.x >= 1.4.1 JRE is used, but not a 1.5 JRE. Similarly, a minimum version of 1.4.1_03 and a maximum version of 1.4.1 ensures that the highest available 1.4.1 >= 1.4.1_03 JRE is used, but not a 1.4.2 JRE.

By default, JREs with a beta version number or JREs from an early access release cycle will not be used by the launcher. If you would like to enable the use of these JREs, please check the option allow JREs with a beta version number.

  The JRE search sequence determines how install4j searches for a JRE on the target system. New configurations get a pre-defined default search sequence. install4j has a special mechanism which allows you to bundle JREs with your media files. If you choose a particular JRE for bundling in one of the media file wizards, this JRE will always be used first and you do not need to adjust the search sequence yourself.

If you have problems with JRE detection at runtime, please see the help topic on error handling for a description on how to get diagnostic information.

The following types of search sequence entries are available:

  •  Search registry
  •  Directory
  •  Environment variable

The control buttons on the right allow you to modify the contents of the search sequence list:

  •  Add search sequence entry (key INS)
    Invokes the search sequence entry dialog. Upon closing the search sequence entry dialog with the OK button, a new search sequence entry will be appended to the bottom of the search sequence list.
  •  Remove search sequence entry (key DEL)
    Removes the currently selected search sequence entry without further confirmation.
  •  Move search sequence entry up (key ALT-UP)
    Moves the selected search sequence entry up one position in the class path list.
  •  Move search sequence entry down (key ALT-DOWN)
    Moves the selected search sequence entry down one position in the class path list.
  The design time JDK determines which JDK or JRE is used for the following purposes:
  • Code compilation
    install4j uses a bundled eclipse compiler, so it does not need this functionality from a JDK. However it needs a runtime library against which scripts entered in the installer configuration are compiled. The version of that JDK should correspond to the minimum Java version for the project configured above.

    By default, the rt.jar runtime library of the JRE that is is used to run the install4j IDE is used for code compilation. If your minimum Java version is lower than the Java version used to run install4j, runtime errors can occur if you accidentally use newer classes and method.

  • Context-sensitive Javadoc help
    If you configure a separate design-time JDK or JRE, you can enter a Javadoc directory to get context-sensitive Javadoc help for the runtime library in the Java code editor. By default, context-sensitive Javadoc help is only available for the install4j API.
  • Enhanced code completion functionality
    If you configure a separate design-time JDK (and not a JRE), the Java code editor will show completion proposals for methods in the runtime library with parameter names. By default, parameter names for methods in the runtime library are not available.

The drop-down list next to the JDK option shows the name of all configured JDKs together with their Java versions. In order to configure a new design time JDK, select the JDK option, and click on Configure JDKs. This shows the Configure JDKs dialog.

The list of available design time JDK is saved globally for your entire install4j installation and not for the current project. The only information saved in your project is the name of the JDK configuration. In this way, you can bind a suitable JDK on another installation and on other platforms. If the JDK name saved in the project cannot be found in your install4j installation, the name will be displayed in red color with a "[not configured]" message attached. In that case, when clicking on Configure JDKs, you will be asked if you would like to configure this JDK.

  A build will not be possible until all required fields have been completed. If a required field is missing when starting a build, this tab will be displayed with a warning message.