8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
WebLogic : Upgrade the Java Version Used by WebLogic Components
This article explains how to upgrade the Java version used by WebLogic components.
- Picking a Java Location
- Update WebLogic Config
- Standard Java Location (Fixed)
- Standard Java Location (Symbolic Link)
Picking a Java Location
There are three approaches to handling Java upgrades.
- Put the new version of Java in a new location and update the WebLogic config to point to the new location.
- Use a standard location for Java and always make sure the latest version is put in this same place. This could be a physical location, or a symbolic link.
- Use the RPM version of Java. The problem with this is it requires root access or sudo privilege, which you may not have.
Update WebLogic Config
- Stop all components under the middleware home and the domain home.
Assuming the
MW_HOME
andDOMAIN_HOME
environment variables are set correctly, use the followingfind
commands to identify files that need to be checked. Depending on the WebLogic version and node manager configuration used, the locations of the files may vary.find $MW_HOME -name commBaseEnv.sh find $MW_HOME -name commEnv.sh find $MW_HOME -name setNMJavaHome.sh find $MW_HOME -name nodemanager.properties find $DOMAIN_HOME -name setDomainEnv.sh find $DOMAIN_HOME -name setNMJavaHome.sh find $DOMAIN_HOME -name nodemanager.properties
- Check each file identified above and amend any explicit paths reference by
JAVA_HOME
environment variables. - Start all components as normal.
- Use the
ps
command to check the Java location used by all WebLogic processes (ps -ef | grep ora
).
Standard Java Location (Fixed)
You could use a specific location, like the example below.
cd /u01 tar -xvf /u01/software/jdk-8u161-linux-x64.tar.gz mv jdk1.8.0_161 java export JAVA_HOME=/u01/java
To perform a Java upgrade do the following.
- Stop all WebLogic components.
- Replace the contents of the "/u01/java" location with the latest version of Java.
- Start all WebLogic components.
Standard Java Location (Symbolic Link)
You could use a symbolic link to maintain a standard location.
cd /u01/java tar -xvf /u01/software/jdk-8u161-linux-x64.tar.gz rm latest ln -s ./jdk1.8.0_161 latest export JAVA_HOME=/u01/java/latest
To perform a Java upgrade do the following.
- Stop all WebLogic components.
- Replace the symbolic link "/u01/java/latest" so it points to the latest version of Java which you have previously unzipped.
- Start all WebLogic components.
For more information see:
Hope this helps. Regards Tim...