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.

  1. Edit the file %MW_HOME%\wlserver_10.3\common\bin\commEnv.cmd
    1. Look for “set  JAVA_HOME=…” and change the path so that it reads “set  JAVA_HOME=C:\Program Files\Java\jdk\1.6.0_45” (or in whichever directory your JDK is installed)
    2. image
  2. 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)
    1. Look for “set BEA_JAVA_HOME=…”. Unset this variable so that it reads “set BEA_JAVA_HOME=”.
    2. 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)
    3. Not far below, look for “set JAVA_VENDOR=Oracle”. Change this to “set JAVA_VENDOR=Sun”.
    4. 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)
    5. image
  3. Edit the file %MW_HOME%\wlserver_10.3\common\nodemanager\nodemanager.properties
    1. Look for any set parameters called “JavaHome” and change the parameter’s value to “JavaHome=C\:\\PROGRA~1\\Java\\JDK16~1.0_4\\jre”
    2. image
  4. Edit the file %MW_HOME%\utils\bsu\bsu.cmd
    1. 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).
  5. Edit the file %MW_HOME%\utils\quickstart\quickstart.cmd
    1. 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).
  6. Edit the file %MW_HOME%\utils\uninstall\uninstall.cmd
    1. 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).
  7. Restart all WebLogic servers.

Your WebLogic servers should now be using the JDK instead of JRockit.

Source: Oracle Support note 1309855.1