Verify and Fix Environment Variables

Check values and correct them, if required, as mentioned below:

Check Values

To check variable values:

  1. Open a DOS prompt window.
  2. Run:
    middleware_home\user_projects\domains\OPADomain\bin\setDomainEnv.cmd  
    

    For example:

    c:\oracle\middleware\user_projects\domains\OPADomain\bin\setDomainEnv.cmd
    

    The script should run with no errors.

  3. Inspect the value of JAVA_HOME:
    1. At the DOS command prompt, type: set JAVA_HOME. You should see the location where you installed JDK following instructions in Download Oracle Java Development Kit.
    2. Enter: dir %java_home%. You should see the directory specified as your JAVA_HOME containing a file called src.zip and four subdirectories: jre, lib, bin, and include.

      If you do not see these things, you will need to add them as directed in Correct Values.

      If JAVA_HOME contains any spaces or if any of the directories in its path are greater than 8 characters, you will need to correct them as directed in Correct Values.

  4. Inspect the value of JAVA_VM. At the command prompt, enter: set JAVA_VM. You should see something like JAVA_VM=-server. If not, correct as directed in Correct Values.

Correct Values

To correct any of the above problems:

  1. Navigate to middleware_home\Oracle_Home_FR\oracle_common\common\bin.
  2. Back up commEnv.cmd.
  3. Open commEnv.cmd in a text editor.
  4. The first set command in the file, before any other set command, must identify the JAVA_HOME value. For example:
    set JAVA_HOME=c:\app\java\jdk
  5. Find:
    set JAVA_VM=-client

    change it to:

    set JAVA_VM=-server

  6. Close the DOS window and open a new one, then repeat the steps in Check Values.