How To Change Type of JDK (Sun / JRockit) for FMW 11g Domain [ID 1058804.1]
OPTION 1: Switch JDK for all the servers in all domains under this Middleware home
Locate the following section in $MW_HOME/wlserver_10.3/common/bin/commEnv.sh and update the the JAVA_VENDOR and JAVA_HOME values in there to use the new JDK:
e.g. to switch to JRockit:
JAVA_VENDOR="Oracle" JAVA_HOME="path to the JRockit JDK home"
OPTION 2: Switch JDK for a given domain
3) Backup the $MW_HOME/user_projects/domains/<domain name>/bin/setDomainEnv.sh file
4) Edit $MW_HOME/user_projects/domains/<domain name>/bin/setDomainEnv.sh ,change the JAVA_HOME and add the JAVA_VENDOR in the following section:
# We need to reset the value of JAVA_HOME to get it shortened AND # we can not shorten it above because immediate variable expansion will blank it JAVA_HOME="${JAVA_HOME}" export JAVA_HOME
replace it by:
# We need to reset the value of JAVA_HOME to get it shortened AND # we can not shorten it above because immediate variable expansion will blank it JAVA_HOME="<path to the new JDK" JAVA_VENDOR=<new Java vendor> export JAVA_HOME
For example:
JAVA_HOME=”C:/bea/jrockit-jdk1.6.0_26-R28.1.4-4.0.1″
5) Start the servers again and they should all use new JDK . If you find any issue, just revert to the backup of setDomainEnv.sh and restart the environment again to keep running with the original JDK.