- 20 Installing the JDK and the JRE with a Configuration File
- Using a Configuration File
- Configuration File Options
- Sample Configuration File
- System Runtime Configuration File
- 17 Windows JRE Installer Options
- Introduction
- Command-Line Installation
- Static Installation
- Creating a Log File
- 12 Installation of the JRE with a Configuration File
- Using a Configuration File
- Configuration File Options
- Sample Configuration File
- System Runtime Configuration File
20 Installing the JDK and the JRE with a Configuration File
You can use a configuration file to standardize JDK and JRE installations and specify options that are not available on the command line. An installer configuration file is an alternative to, and extension of, options specified on the installer command line.
Note: Windows, macOS, Linux, and Solaris command-line installers support the configuration file, but not every operating system supports all configuration file options.
This page has these sections:
Using a Configuration File
If you are installing the JRE or JDK on Windows, use the INSTALLCFG command-line option to specify a configuration file:
installer INSTALLCFG= configuration_file_path
installer is the installer base file name, for example, jre-8u211-windows-x64.exe or jdk-8u211-windows-x64.exe .
configuration_file_path is the path to the configuration file.
If you are installing the JRE or JDK on Solaris, Linux, or macOS, create a configuration file name named /etc/java/config/jre-install.properties . When you launch the JRE or JDK installer, it looks for a configuration file with this specific path and name.
Configuration File Options
The following table lists the installer configuration file options that apply for each operating system.
Note:
- You may substitute the value Enable for 1 and the value Disable for 0 .
- You may use the same options at the command line when running the JDK or JRE Windows Offline Installer. See «Command-Line Installation».
Table 20-1 Configuration File Options
Option | Operating Systems | Values | Description | Default Value | Saved in Runtime Configuration File? |
---|---|---|---|---|---|
AUTO_UPDATE= | Windows, macOS | Enable , Disable | Enables the auto update feature. | Enable | yes |
DEPLOYMENT_RULE_SET= | Windows, macOS, Linux, Solaris | path | Specifies the path and file name of your organization’s deployment rule set. See Deployment Rule Set in the Java Platform, Standard Edition Deployment Guide. | None | yes |
EULA= | Windows | Enable , Disable | Prompts the user to accept the end-user license agreement (EULA) if a Java applet or Java Web Start application is launched. | Disable | yes |
INSTALL_SILENT= | Windows | Enable , Disable | Performs a silent (non-interactive) installation. | Disable | yes |
INSTALLDIR= | Windows | path | Specifies the folder/directory into which the files are installed. For Windows, this will only work for first time install of a family. Linux and Solaris use operating system tools for this purpose and installation directory relocation will be handled by operating system tools (for example: rpm —prefix=path ) | Operating system default path | no |
INSTALLDIRPUBJRE= | Windows | path | When installing the JDK, this option specifies the folder where the public JRE is installed. When specifying this option, you must also specify which folder where the JDK is installed with the INSTALLDIR option. | Operating system default path | No |
NOSTARTMENU= | Windows | Enable , Disable | Specifies that the installer installs the JDK or JRE without setting up Java start-up items. | Disable | no |
REBOOT= | Windows | Enable , Disable | If disabled, prompts you to restart your computer after installing the JDK or JRE. However, in most cases, the installer does not need to restart your computer after installing the JDK or JRE. | Enable | no |
REMOVEOUTOFDATEJRES= | Windows | 0 , 1 | 0 | no | |
STATIC= | Windows | Enable , Disable | Performs a static installation (see «Static Installation»). | Disable | no |
USAGETRACKER_CFG= | Windows, macOS, Linux, Solaris | path | Specifies the path and file name of the Java Usage Tracker properties file. See Java Usage Tracker Guide. | None | yes |
WEB_ANALYTICS= | Windows | Enable , Disable | Enables or disables the installer to send installation-related statistics to an Oracle server. | Enable | yes |
WEB_JAVA_SECURITY_LEVEL= | Windows, macOS, Linux, Solaris | H (high), VH (very high) | Configures the installation’s security level for Java applications running in a browser or run with Java Web Start. | H | no |
WEB_JAVA= | Windows, macOS, Linux, Solaris | Enable , Disable | Configures the installation so downloaded Java applications are, or are not, allowed to run in a web browser or by Java Web Start. | Enable | no |
Sample Configuration File
The following is a sample JRE configuration file for Windows. It specifies the following:
Perform a silent install.
Install the JRE in the directory C:\java\jre .
Set the security level for unsigned Java applications running in a browser to very high.
Example 20-1 Sample Configuration File for Windows
System Runtime Configuration File
After installing the JDK or JRE with a configuration file, the installer saves the file (with a subset of options used during install) in one of the following locations in your computer, depending on your operating system:
The value of the environment variable %ALLUSERSPROFILE% is typically C:\ProgramData .
17 Windows JRE Installer Options
This page describes options for installing, configuring, and creating a log file for the Windows Java Runtime Environment.
This page contains the following topics:
See «JDK 8 and JRE 8 Installation Start Here» for general information about installing JDK 8 and JRE 8.
Introduction
This page describes options for installation of the Java SE Runtime Environment (JRE) on Windows 32-bit platform. It is intended for:
System administrators deploying the JRE with Java Plug-in and Java Web Start technologies on multiple PCs in their Intranet without user interaction.
Vendors having products requiring the JRE. The JRE can be silently (non-interactively from the command line) installed with their product.
JRE installers are built using Microsoft Window Installer (MSI) 2.0 technology. MSI contains built-in support for silent installations. This topic explains how to manually install the JRE using the .exe file that runs the MSI.
Command-Line Installation
This section describes the command-line options for the JRE Windows Offline Installer. Run the installer as follows:
jre refers to the JRE Windows Offline Installer base file name (for example, jre-8u05-windows-i586.exe ).
INSTALLCFG= configuration_file_path specifies the path of the installer configuration file. See «Installing With a Configuration File» for more information.
options are options with specified values separated by spaces. Use the same options as listed in Table 20-1, «Configuration File Options». In addition, you may use the option /s for the JRE Windows Offline Installer to perform a silent installation.
Static Installation
If you perform a static installation of the JRE (by specifying the command-line or configuration file option STATIC=1 ), then the Java Auto Update feature will leave that JRE installed during a Java update. A later version of the same JRE family will be installed in a separate directory. This mode ensures that vendors, who require a specific version of the JRE for their product, can be certain that the JRE will not be overwritten by a newer version.
The default installation directory of a static JRE is C:\Program Files (x86)\Java\jre n (for 32-bit versions) or C:\Program Files\Java\jre n (for 64-bit versions), where n is the full Java SE release and update number (for example, n = 1.8.0_20 for release 8 update 20).
Creating a Log File
Use a log file to verify that an installation succeeded. To create a log file describing the installation, append /L C:\ path setup.log to the install command and scroll to the end of the log file to verify.
The following is an example of creating a log file:
12 Installation of the JRE with a Configuration File
You can use a configuration file to standardize JRE 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.
Windows, macOS, and Linux command-line installers support the configuration file, but not every operating system supports all configuration file options.
This topic includes the following sections:
Using a Configuration File
If you are installing the JRE on Windows, then use the INSTALLCFG command-line option to specify a configuration file:
jre INSTALLCFG= configuration_file_path
jre is the installer base file name, for example, jre- 10 .0.1_windows-x64_bin.exe .
configuration_file_path is the path to the configuration file.
If you are installing JRE on Solaris, Linux, or macOS, then create a configuration file with the name /etc/java/config/jre-install.properties . When you start the JRE installer, it looks for a configuration file with this specific path and name.
Configuration File Options
The Table lists the installer configuration file options that apply for each operating system.
Substitute the value of Enable to 1 and the value Disable to 0 .
Use the same options at the command line when running the JRE Windows Offline Installer. See JRE Command-Line Installation.
Table 12-1 Configuration File Options
Option | Operating Systems | Values | Description | JRE Offline Installer | Saved in Runtime Config File |
---|---|---|---|---|---|
INSTALL_SILENT= | Windows | Enable , Disable | Yes | Yes | |
INSTALLDIR= | Windows | path | Yes | No | |
STATIC= | Windows | Enable , Disable | Yes | No | |
WEB_JAVA_SECURITY_LEVEL= | Yes | No | |||
WEB_ANALYTICS= | Windows | Enable , Disable | Yes | Yes | |
EULA= | Windows | Enable , Disable | Yes | Yes | |
REBOOT= | Windows | Enable , Disable | Yes | No | |
NOSTARTMENU= | Windows | Enable , Disable | Yes | No | |
REMOVEOUTOFDATEJRES= | Windows | 0 , 1 |