7 Installation of the JDK with a Configuration File on Microsoft Windows Platform

You can use a configuration file to standardize JDK installations and specify options that are not available on the command line.

This topic describes the configuration file that supplements JDK command-line installation options. An installer configuration file is an alternative to, and extension of, options specified on the installer command line.

Using a Configuration File

Use the INSTALLCFG command-line option to specify a configuration file while installing the JDK on Windows:

jdk INSTALLCFG=configuration_file_path

  • jdk is the installer base file name, for example, jdk-11_windows-x64_bin.exe.

  • configuration_file_path is the path to the configuration file.

Configuration File Options

The Table lists the installer configuration file options that apply for Windows operating system.

Note:

Substitute the value of Enable to 1 and the value Disable to 0.

Table 7-1 Configuration File Options

Option Operating Systems Values Description
INSTALL_SILENT= Windows Enable, Disable

Silent (noninteractive) installation.

Default: Disable

INSTALLDIR= Windows path

Folder/directory into which the files are installed.

Default: Operating system default path

For Windows, this will work only for first time installation.

REBOOT= Windows Enable, Disable

If disabled, then the installer will never prompt you to restart your computer after installing the JDK. However, in most cases, the installer does not need to restart your computer after installing the JRE.

Default: Enable

Sample Configuration File

The following is a sample configuration file for Windows. It specifies the following:

  • Perform a silent installation.

  • Install the JDK in the directory C:\java\jdk.

Example 7-1 Sample Configuration File for Windows

INSTALL_SILENT=Enable
INSTALLDIR=C:\java\jdk