8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » Web » Here

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

There are three approaches to handling Java upgrades.

  1. Put the new version of Java in a new location and update the WebLogic config to point to the new location.
  2. 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.
  3. 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

  1. Stop all components under the middleware home and the domain home.
  2. Assuming the MW_HOME and DOMAIN_HOME environment variables are set correctly, use the following find 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
  3. Check each file identified above and amend any explicit paths reference by JAVA_HOME environment variables.
  4. Start all components as normal.
  5. 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.

  1. Stop all WebLogic components.
  2. Replace the contents of the "/u01/java" location with the latest version of Java.
  3. 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.

  1. Stop all WebLogic components.
  2. Replace the symbolic link "/u01/java/latest" so it points to the latest version of Java which you have previously unzipped.
  3. Start all WebLogic components.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.