Setting an Environment Variable for Java

After installing the JDK, you must set the following environment variables to ensure the P6 EPPM installation scripts can locate your Java libraries:

Setting the Environment Variables in Microsoft Windows

To set the JAVA_HOME and PATH environment variables in Microsoft Windows:

  1. Click Start, Control Panel, System, and then Advanced system settings.
  2. In the System Properties dialog box, on the Advanced tab, click Environment Variables.
  3. Add the JAVA_HOME environment variable:
    1. In the System Variables section, click New.
    2. In the Variable name field, enter JAVA_HOME.
    3. In the Variable value field, enter the location where the JDK software is installed (for example, C:\Program Files\Java\<java_version>)
    4. Click OK.
  4. Update the PATH environment variable to include the location of the Java executable files:
    1. In the System Variables section, select the PATH variable, and click Edit.
    2. In the Variable value field, insert %JAVA_HOME%\bin; in front of all the existing directories. Do not delete any existing entries; otherwise, some existing applications may not run.
    3. Click OK.
  5. Exit the Control Panel.

Setting the Environment Variables with Unix or Linux

To set the JAVA_HOME and PATH environment variables with Unix or Linux:

  1. Set the JAVA_HOME environment variable by typing the following command:

    export JAVA_HOME=<JDK_installation_path>

  2. Set the PATH environment variable by typing the following command:

    export PATH=$PATH:$JAVA_HOME/bin

Related Topics

JDK Installation



Legal Notices
Copyright © 1999, 2016, Oracle and/or its affiliates. All rights reserved.

Last Published Monday, October 24, 2016