B Updating the JDK After Installing and Configuring an Oracle Fusion Middleware Product
If the JDK configured with an Oracle home or domain home is no longer certified or is no longer the JDK that you want to use, update the JDK location so Oracle Fusion Middleware utilities, such as Configuration Wizard (config.sh|cmd), OPatch, and domain startup scripts, use the certified JDK.
Oracle WebLogic Server 26 (26.1.0.0.0) supports JDK version 21, and JDK 25. See Oracle Fusion Middleware Supported System Configurations for the JDK versions certified with this release.
You can maintain multiple certified JDK versions and switch to the required version as needed.
- About Updating the JDK Location After Installing an Oracle Fusion Middleware Product
Update the JDK location used by Oracle Fusion Middleware utility scripts and domain files when you change to another certified JDK.
About Updating the JDK Location After Installing an Oracle Fusion Middleware Product
Update the JDK location used by Oracle Fusion Middleware utility scripts and domain files when you change to another certified JDK.
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 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, if you configured the Oracle home using JDK 21 and later install JDK 25, select the JDK 25 home on the Domain Mode and JDK screen of the Configuration Wizard. Example:
/scratch/jdk/jdk-25. -
Manually locate the files that have references to the JDK using
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|cmdscript displays the value of a variable, such asJAVA_HOME, from the.globalEnv.propertiesfile. ThesetProperty.sh|cmdscript is used to set the value of variables, such asOLD_JAVA_HOMEorJAVA_HOMEthat contain the locations of old and new JDKs in the.globalEnv.propertiesfile. - Updating the JDK Location in an Existing Domain Home
Before updating JDK references in an existing domain home, back up DOMAIN_HOME.
Updating the JDK Location in an Existing Oracle Home
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.
The getProperty.sh|cmd and setProperty.sh|cmd scripts are in the following location:
(Linux)
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 /path/to/jdk-21.
.globalEnv.properties file:
Updating the JDK Location in an Existing Domain Home
Before updating JDK references in an existing domain home, back up DOMAIN_HOME.
Search DOMAIN_HOME for the old JDK path and replace every generated reference with the new certified JDK path. At minimum, check the following files when they exist:
-
(Linux)
DOMAIN_HOME/bin/setDomainEnv.sh -
(Windows)
DOMAIN_HOME\bin\setDomainEnv.cmd -
(Linux)
DOMAIN_HOME/bin/setNMJavaHome.sh -
(Windows)
DOMAIN_HOME\bin\setNMJavaHome.cmd -
(Linux and Windows)
DOMAIN_HOME/nodemanager/nodemanager.properties -
(Linux and Windows)
DOMAIN_HOME/init-info/tokenValue.properties -
(Linux and Windows)
DOMAIN_HOME/init-info/domain-info.xml -
(Linux and Windows)
DOMAIN_HOME/init-info/nodemanager-properties.xml -
(Linux and Windows)
DOMAIN_HOME/init-info/startscript.xml
After updating the files, verify that DOMAIN_HOME no longer contains the old JDK path. Restart Node Manager and any affected servers so the updated JDK path is used.