If you have configured Oracle WebLogic Server (whether as a standalone product or as a part of Oracle Fusion Middleware) to use JRockit, you can use these steps to configure your WebLogic environment to switch from Oracle JRockit to Oracle JDK (formerly Sun JDK).
NOTE: Please make a backup of all configuration files that will be updated.
NOTE: The Oracle Middleware home will represented by the environment variable %MW_HOME% in this article. Also, we will use JDK 1.6.0_45 (64-bit) installed in C:\Program Files\Java\jdk1.6.0_45 as an example.
- Edit the file %MW_HOME%\wlserver_10.3\common\bin\commEnv.cmd
- Edit the file %MW_HOME%\user_projects\domains\%DOMAIN%\bin\setDomainEnv.cmd for each of your WebLogic domains (which you wish to move from JRockit to JDK)
- Look for “set BEA_JAVA_HOME=…”. Unset this variable so that it reads “set BEA_JAVA_HOME=”.
- Look for “set SUN_JAVA_HOME=” right below it and change the path so that it reads “set SUN_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45” (or in whichever directory your JDK is installed)
- Not far below, look for “set JAVA_VENDOR=Oracle”. Change this to “set JAVA_VENDOR=Sun”.
- Look for “set JAVA_HOME=…” right below it and change the path so that it reads “set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45” (or in whichever directory your JDK is installed)
- Edit the file %MW_HOME%\wlserver_10.3\common\nodemanager\nodemanager.properties
- Edit the file %MW_HOME%\utils\bsu\bsu.cmd
- Look for the line “set JAVA_HOME=…” and change the path so that it reads “set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_45” (or in whichever directory your JDK is installed).
- Edit the file %MW_HOME%\utils\quickstart\quickstart.cmd
- Look for the line “set JAVA_HOME=…” and change the path so that it reads “set JAVA_HOME=C:Program Files\Java\jdk1.6.0_45” (or in whichever directory your JDK is installed).
- Edit the file %MW_HOME%\utils\uninstall\uninstall.cmd
- Look for the line “set JAVA_HOME=…” and change the path so that it reads “set JAVA_HOME=C:Program Files\Java\jdk1.6.0_45” (or in whichever directory your JDK is installed).
- Restart all WebLogic servers.
Your WebLogic servers should now be using the JDK instead of JRockit.
Source: Oracle Support note 1309855.1