Consider that you have a JDK version jdk1.8.0_121 installed on your machine. When you install and configure an Oracle Fusion Middleware product, the utilities, such as Configuration Wizard (config.sh|exe
), OPatch, or RCU point to a default JDK, for example, jdk1.8.0_121. After some time, Oracle releases a new version of the JDK, say jdk1.8.0_131 that carries security enhancements and bug fixes. From 12c (12.2.1.3.0) onwards, you can upgrade the existing JDK to a newer version, and can have the complete product stack point to the newer version of the JDK.
You can maintain multiple versions of JDK and switch to the required version on need basis.
ORACLE_HOME/oui
directory.The binaries and other metadata and utility scripts in the Oracle home and Domain home, such as RCU or Configuration Wizard, use a JDK version that was used while installing the software and continue to refer to the same version of the JDK. The JDK path is stored in a variable called JAVA_HOME which is centrally located in .globalEnv.properties file inside the ORACLE_HOME/oui
directory.
The utility scripts such as config.sh|cmd, launch.sh, or opatch reside in the ORACLE_HOME, and when you invoke them, they refer to the JAVA_HOME variable located in .globalEnv.properties file. To point these scripts and utilities to the newer version of JDK, you must update the value of the JAVA_HOME variable in the .globalEnv.properties file by following the directions listed in Updating the JDK Location in an Existing Oracle Home.
Specify the path to the newer JDK on the Domain Mode and JDK screen while running the Configuration Wizard.
For example, consider that you installed Oracle Fusion Middleware Infrastructure with the JDK version 8u121. So while configuring the WebLogic domain with the Configuration Assistant, you can select the path to the newer JDK on the Domain Mode and JDK screen of the Configuration Wizard. Example: /scratch/jdk/jdk1.8.0_131
.
Manually locate the files that have references to the JDK using grep
(UNIX) or findstr
(Windows) commands and update each reference. See Updating the JDK Location in an Existing Domain Home.
Note:
If you install the newer version of the JDK in the same location as the existing JDK by overwriting the files, then you don’t need to take any action.getProperty.sh|cmd
script displays the value of a variable, such as JAVA_HOME, from the .globalEnv.properties file. The setProperty.sh|cmd
script is used to set the value of variables, such as OLD_JAVA_HOME or JAVA_HOME that contain the locations of old and new JDKs in the .globalEnv.properties file.The getProperty.sh|cmd
script displays the value of a variable, such as JAVA_HOME, from the .globalEnv.properties file. The setProperty.sh|cmd
script is used to set the value of variables, such as OLD_JAVA_HOME or JAVA_HOME that contain the locations of old and new JDKs in the .globalEnv.properties file.
getProperty.sh|cmd
and setProperty.sh|cmd
scripts are located in the following location:
(UNIX) ORACLE_HOME/oui/bin
(Windows) ORACLE_HOME\oui\bin
Where, ORACLE_HOME is the directory that contains the products using the current version of the JDK, such as jdk1.8.0_121.
You must search the references to the current JDK, for example jdk1.8.0_121 manually, and replace those instances with the location of the new JDK.
You can use the grep
(UNIX) or findstr
(Windows) commands to search for the jdk-related references.
(UNIX) DOMAIN_HOME/bin/setNMJavaHome.sh
(Windows) DOMAIN_HOME\bin\setNMJavaHome.cmd
(UNIX) DOMAIN_HOME/nodemanager/nodemanager.properties
(Windows) DOMAIN_HOME\nodemanager\nodemanager.properties
(UNIX) DOMAIN_HOME/bin/setDomainEnv.sh
(Windows) DOMAIN_HOME\bin\setDomainEnv.cmd
Note:
If you change the value of JAVA_HOME for the Node Manager in the setNMJavaHome.sh|cmd
file, then the Oracle BI system components that you has started using the Node Manager will automatically use the new JAVA_HOME that you specify in the setNMJavaHome.sh|cmd
file.
Observe caution while updating the setDomainEnv.sh|cmd
file. Any incorrect updates may undo the manual operations, such as scale-out, upgrade, or extending the domain, that were performed on the domain.