Sunday, November 29, 2015

WLS: Change JVM (JDK/JRockit) - Linux

Following post will help you to upgrade/change the JDK used by an Oracle WebLogic Server to a newer version.
  • Upgrade JDK:
  1. Make sure new JDK version is certified with Weblogic version and other products installed in the same domain.
  2. Install New JDK.
  3. Shutdown Weblogic domain
  4. Modify all occurrences of the original JDK directory path value with the new JDK directory path value for the files listed below.

  5. Note 1: Take backup of below mentioned files before change.
    Note 2: Following command will help you find list of files referring to JAVA_HOME
    find . -type f -name "*.sh" -exec grep -il JAVA_HOME {} \;

    • MW_HOME/wlserver_10.3/common/bin/
    • MW_HOME/wlserver_10.3/common/nodemanager/
    • MW_HOME/utils/bsu/
    • MW_HOME/utils/quickstart/
    • MW_HOME/utils/uninstall/
    • MW_HOME/wlserver_10.3/
    • DOMAIN_HOME/user_projects/domains/<mydomain>/bin/

    • MW_HOME/install/
    • MW_HOME/oracle_common/common/bin/
    • MW_HOME/oracle_common/common/bin/
    • MW_HOME/oui/bin/
    • MW_HOME/oui/bin/
    • MW_HOME/oui/bin/
    • MW_HOME/wlserver/
    • DOMAIN_HOME/bin/
    • DOMAIN_HOME/nodemanager/

  6. Clear cache and tmp folders resides in each server folder.

  7. Note: Incase Weblogic version is 10.3.6 and the targetJDK version is JAVA 7 (version 1.7.0_x),following jar files needs to be copied manually from $MW_HOME/modules to the directory $JAVA_HOME/jre/lib/endorsed

    • javax.annotation_1.0.0.0_1-0.jar
    • javax.xml.bind_2.1.1.jar
    • javax.xml.ws_2.1.1.jar

  8. Startup Weblogic domain

  9. Simple way: You can install new JDK and rename new JDK folder name to old JDK name to skip JAVA_HOME path update in all the files mentioned in step 4.
  • Change JRockit to JDK and Vice-versa:
    Refer below steps along with above mentioned JDK upgrade steps.
  1. Refer below 2 steps and update following two files as needed:
  2. If you are changing from JRockit  to JDK:
  3. JAVA_HOME="/usr/bin/jdk1.6.0_31"
    export JAVA_HOME
    export JAVA_VENDOR
  4. If you are changing from JDK  to JRockit:
  5. JAVA_HOME="/usr/bin/jrockit_28.1"
    export JAVA_HOME
    export JAVA_VENDOR

Refer to Oracle Security Alerts page to get latest patch updates.

1 comment:

  1. I learned installing Java successfully and created my first mobile app a few days ago, and it was truly a fun experience. I did it under the guidance of Java experts.


Provide your thoughts !