- 20 Installing With a Configuration File
- Using a Configuration File
- Configuration File Options
- 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
- Java runtime configuration file
- JRE MSI Installer Configuration Options
- Creating a JRE MSI Installer Configuration File
- System Runtime Configuration File
- B Configuring the Java Runtime Properties
- Modifying the jwc_properties.ini File
- Using the CLI set-property Command
- Using CLI Commands to Alter Network-Related Settings
- Restarting Java on the Qualcomm IoE Board
20 Installing With a Configuration File
This page describes the configuration file that supplements JDK command line installation options.Windows, OS X, and Linux command-line installers support the configuration file, but not every operating system supports all configuration file options.
An installer configuration file is an alternative to, and extension of, options specified on the installer command line. You can use a configuration file to standardize installations, and you can use a configuration file to specify options that are not available on the command line.
This page has these sections:
Using a Configuration File
If you are installing the JRE on Windows, 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-8u05-windows-i586.exe .
- configuration_file_path is the path to the configuration file.
If you are installing JRE on Solaris, Linux, or OS X, create a configuration file name named /etc/java/config/jre-install.properties . When you launch the JRE installer, it looks for a 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.
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 JRE Windows Offline Installer. See «Command-Line Installation».
Table 20-1 Configuration File Options
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.
- 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
Note: Applicable to online and offline installers only (files and wrappers).
Enables uninstallation of existing out-of-date JREs during JRE install.
Using REMOVEOUTOFDATEJRES=0 leaves all out-of-date Java versions on the system. Using REMOVEOUTOFDATEJRES=1 removes all out-of-date Java versions from the system.
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
INSTALL_SILENT=Enable INSTALLDIR=C:\java\jre WEB_JAVA_SECURITY_LEVEL=VH
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:
- Windows: %ALLUSERSPROFILE%\Oracle\Java\java.settings.cfg The value of the environment variable %ALLUSERSPROFILE% is typically C:\ProgramData .
- Solaris and Linux: /etc/Oracle/Java/java.settings.cfg
- macOS: /Library/Application/Support/Oracle/Java/java.settings.cfg
Java runtime configuration file
When installing the Java Runtime Environment (JRE) from the command line, you can use a configuration file to supplement the JRE MSI Installer command-line options.
You can create and use a configuration file to standardize installations and to specify options that are not available on the command line.
This section includes the following topics:
JRE MSI Installer Configuration Options
The following table lists the JRE MSI Installer configuration options and identifies which can be used in a configuration file and which can be used on the command line.
Options listed in the following table that can be used to create a configuration file are flagged Y in the Used in Config File column. Options flagged Y in the Used in Command Line column can be used in the command line when running the JRE MSI Installer. The options that are not available on the command line can be specified in the configuration file. See Running the JRE MSI Installer.
You can substitute Enable for 1 and Disable for 0 .
Table 2-1 Configuration Options
Specifies the path and file name of your organization’s deployment rule set. See Deployment Rule Set in Java Platform, Standard Edition Deployment Guide .
Prompts the user to accept the end-user license agreement (EULA) if a Java applet or Java Web Start application is launched.
Specifies the folder or directory into which the files are installed. In 8u371, the default directory changed to \ProgramFiles\Java\jre-$family (jre-1.8). In 8u381 b32 and later BPRs, this has changed to \ProgramFiles\Java\jre-$feature where $feature is the feature release value.
For Windows, this only works for the first-time installation of a family.
Specifies that the JRE MSI Installer installs the JRE without setting up Java start-up items.
If disabled, the installer does not prompt you to restart your computer after installing the JRE. However, in most cases, the JRE MSI Installer does not need to restart your computer after installing the JRE.
8u371 ended support for this option. The REMOVEOLDERJRES option is ignored beginning in 8u371. Customers that need to retain older JRE versions should use the new RETAIN_ALL_VERSIONS option in the 8u381 b32 or later BPRs downloaded from MOS.
Before 8u371, using REMOVEOLDERJRES=1 enabled uninstalling all existing non-statically installed Java versions from a system during the installation of the JRE.
Added in 8u381 b32 BPR. The JRE MSI installers for JRE 8u371 and JRE 8u381 GA removed the ability to retain older JRE versions already installed on disk. (The REMOVEOLDERJRES option was disabled in these versions.) Customers that need to retain older JRE versions should use the new RETAIN_ALL_VERSIONS option in the 8u381 b32 or later BPRs downloaded from MOS.
Enables the installation of multiple JREs of the same family without removing other versions of JRE 8.
When RETAIN_ALL_VERSIONS=1 , the JRE MSI Installer installs JRE 8 in a jre $fullversion directory instead of in the default jre-1.8 shared directory. For example, if RETAIN_ALL_VERSIONS=1 is set., JRE 8u381 would be installed into a jre1.8.0_381 directory instead of the default jre-1.8 shared directory
INSTALLDIR is still allowed, unless it conflicts with the directory specified by RETAIN_ALL_VERSIONS .
Specifies the path and file name of the Java Usage Tracker properties file.
Allows or disallows the installer to send installation-related statistics to an Oracle server.
Configures the installation’s security level for Java applications running in a browser or running with Java Web Start.
Configures the installation so that downloaded Java applications are, or are not, allowed to run in a web browser or by Java Web Start.
Creating a JRE MSI Installer Configuration File
A configuration file provides an alternative to setting options on command line when running the JRE MSI Installer.
You can use the configuration file to standardize installations and to specify additional installation options that are not available on the command line.
- Either create a new file or open an existing configuration file in an ASCII text editor.
- Add or edit options in the configuration file. Refer to the Configuration Options table in JRE MSI Installer Configuration Options for available options.
- Save your configuration file as a text file in a directory of your choice.
- When you run the JRE MSI Installer (Running the JRE MSI Installer ), specify the path and file name of the configuration file in the JRE MSI Installer command.
- Installs the JRE in the directory C:\java\jre .
- Sets the security level for unsigned Java applications running in a browser to very high. Example of a Simple JRE MSI Installer Configuration File
INSTALLDIR=C:\java\jre WEB_JAVA_SECURITY_LEVEL=VH
System Runtime Configuration File
After installing a newer build of a JRE 8 version, the JRE MSI Installer creates the system runtime configuration file.
After using a configuration file to install the JRE, the JRE MSI Installer saves it as a system runtime configuration file in C:\Program Files (x86)\Common Files\Oracle\Java\java_settings.cfg
B Configuring the Java Runtime Properties
There are several ways to change the value of a property that affects Java’s configuration or behavior at runtime.
Modifying the jwc_properties.ini File
The jwc_properties.ini file contains all the properties that affect Java configuration and behavior at runtime. In order to edit this file, do the following:
- Open the jwc_properties.ini that is a part of the Oracle Java ME Embedded bundle (or download it from the board using the Brew MP SDK Loader tool), find the property that should be changed, and modify its value.
- Copy the modified version of the jwc_properties.ini file to the /sys/mod/java directory on the Qualcomm IoE board using the Brew MP SDK Loader tool.
- If there is a jwc_properties.inix file located in this directory, delete it.
- Restart Java on the Qualcomm IoE board.
Using the CLI set-property Command
To modify a property using the set-property command in the command-line interface (CLI), do the following.
- Connect to the board using command-line interface (CLI)
- Execute the » set-property » command.
- Restart Java on the board.
Note, that by executing the » set-property » command, the jwc_properties.ini file is always updated automatically.
Using CLI Commands to Alter Network-Related Settings
To alter the network-related settings, do the following:
- Connect to the board using command-line interface (CLI)
- Execute a command that starts with the prefix » net » to apply a network-related change.
- Apply the network-related change and restart Java.
Restarting Java on the Qualcomm IoE Board
You can use any of the following methods to restart Java on the Qualcomm IoE board.
- Use the CLI » shutdown -r » command. If the » vmconfig.reboot_type » property is set to » soft » (the default) and the reboot_java application has been deployed on your Qualcomm IoE board, then only Java will be rebooted. Otherwise, if the » vmconfig.reboot_type » property is set to » hard » or there is no reboot_java application deployed, then the board will be rebooted. Note that the » vmconfig.reboot_type » property also affects Device I/O API watchdog’s reboot type.
- Using the CLI » net-reconnect » command. This command reconfigures the network and performs a soft Java reboot.
- Press the «RESET KEY» located on the board, or cycle the power to the board.