About Updating the JDK Location After Installing an Oracle Fusion Middleware Product
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 the
.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 the
.globalEnv.properties
file. To point these scripts and utilities to
a newer version of the JDK, you must update the value of the JAVA_HOME
variable in the .globalEnv.properties
file by following the directions
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 8u191. While configuring the WebLogic domain with the Configuration Assistant, select the path to the newer JDK on the Domain Mode and JDK screen of the Configuration Wizard. Example:
/scratch/jdk/jdk17.0.12
. -
Manually locate the files that have references to the JDK using the
grep
(Linux) orfindstr
(WINDOWS) commands and update each reference.
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.- Updating the JDK Location in an Existing Oracle Home
ThegetProperty.sh|cmd
script displays the value of a variable, such as JAVA_HOME, from the .globalEnv.properties file. ThesetProperty.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. - Updating the JDK Location in an Existing Domain Home
You must search the references to the current JDK manually, and replace those instances with the location of the new JDK.