About Updating the JDK Location After Installing Oracle Analytics Server

The binaries and other metadata and utility scripts in the Oracle home and Domain home, such as RCU or Configuration Wizard, use a JDK version that was used while installing the software and continue to refer to the same version of the JDK. The JDK path is stored in a variable called JAVA_HOME which is centrally located in .globalEnv.properties file inside the ORACLE_HOME/oui directory.

The utility scripts such as config.sh|cmd, launch.sh, or opatch reside in the ORACLE_HOME, and when you invoke them, they refer to the JAVA_HOME variable located in .globalEnv.properties file. To point these scripts and utilities to the newer version of JDK, you must update the value of the JAVA_HOME variable in the .globalEnv.properties file by following the directions listed in Updating the JDK Location in an Existing Oracle Home.

To make the scripts and files in your Domain home directory point to the newer version of the JDK, you can follow one of the following approaches:
  • Specify the path to the newer JDK on the Domain Mode and JDK screen while running the Configuration Wizard.

    For example, consider that you installed Oracle Fusion Middleware Infrastructure with the JDK version 8u191. So while configuring the WebLogic domain with the Configuration Assistant, you can select the path to the newer JDK on the Domain Mode and JDK screen of the Configuration Wizard. Example: /scratch/jdk/jdk1.8.0_xxx.

  • Manually locate the files that have references to the JDK using grep (UNIX) or findstr (Windows) commands and update each reference. See Updating the JDK Location in an Existing Oracle Home.


If you install the newer version of the JDK in the same location as the existing JDK by overwriting the files, then you don’t need to take any action. The preferred method is to install into a generic JDK path location instead of a specific version location. For example, use location /usr/java/latest instead of /scratch/jdk/jdk1.8.0_xxx.


The ORACLE_HOME/oui/.globalEnv.properties file is centrally used as a pointer to the JDK directory.

To avoid OPatch getting into self-patching mode and inventory corruption issues:

  • Make sure you have a valid JDK directory outside of the ORACLE_HOME of the Oracle Analytics Server technology stack.
  • Make sure that the PATH isn’t using ORACLE_HOME/oracle_common/jdk because ORACLE_HOME/oracle_common/jdk is a JRE location for internal tools.

Updating the JDK Location in an Existing Oracle Home

The getProperty.sh|cmd script displays the value of a variable, such as JAVA_HOME, from the .globalEnv.properties file. The setProperty.sh|cmd script is used to set the value of variables, such as OLD_JAVA_HOME or JAVA_HOME that contain the locations of old and new JDKs in the .globalEnv.properties file.

The getProperty.sh|cmd and setProperty.sh|cmd scripts are located in the following location:

(Linux) ORACLE_HOME/oui/bin

(Windows) ORACLE_HOME\oui\bin

Where, ORACLE_HOME is the directory that contains the products using the current version of the JDK, such as 1.8.0_xxx.

To update the JDK location in the .globalEnv.properties file:
  1. Use the getProperty.sh|cmd script to display the path of the current JDK from the JAVA_HOME variable. For example:

    (Linux) ORACLE_HOME/oui/bin/getProperty.sh JAVA_HOME

    (Windows) ORACLE_HOME\oui\bin\getProperty.cmd JAVA_HOME

    echo JAVA_HOME

    Where JAVA_HOME is the variable in the .globalEnv.properties file that contains the location of the JDK.

  2. Back up the path of the current JDK to another variable such as OLD_JAVA_HOME in the .globalEnv.properties file by entering the following commands:

    (Linux) ORACLE_HOME/oui/bin/setProperty.sh -name OLD_JAVA_HOME -value specify_the_path_of_current_JDK

    (Windows) ORACLE_HOME\oui\bin\setProperty.cmd -name OLD_JAVA_HOME -value specify_the_path_of_current_JDK

    This command creates a new variable called OLD_JAVA_HOME in the .globalEnv.properties file, with a value that you have specified.
  3. Set the new location of the JDK in the JAVA_HOME variable of the .globalEnv.properties file, by entering the following commands:

    (Linux) ORACLE_HOME/oui/bin/setProperty.sh -name JAVA_HOME -value specify_the_location_of_new_JDK

    (Windows) ORACLE_HOME\oui\bin\setProperty.cmd -name JAVA_HOME -value specify_the_location_of_new_JDK

    After you run this command, the JAVA_HOME variable in the .globalEnv.properties file now contains the path to the new JDK, such as jdk1.8.0_341.

Updating the JDK Location in an Existing Domain Home

You must search the references to the current JDK, for example 1.8.0_191 manually, and replace those instances with the location of the new JDK.

You can use the grep or findstr commands to search for the jdk-related references.

You’ll likely be required to update the location of JDK in the following three files:

(Linux) DOMAIN_HOME/bin/setNMJavaHome.sh

(Windows) DOMAIN_HOME\bin\setNMJavaHome.cmd

(Linux) DOMAIN_HOME/nodemanager/nodemanager.properties


(Linux) DOMAIN_HOME/bin/setDomainEnv.sh



  • If you change the value of JAVA_HOME for the Node Manager in the setNMJavaHome.sh|cmd file, then the components that you started using the Node Manager automatically use the new JAVA_HOME that you specify in the setNMJavaHome.sh|cmd file.

  • Observe caution while updating the setDomainEnv.sh|cmd file. Any incorrect updates might reverse the manual operations (such as scale-out, upgrade, or extending the domain) that were performed on the domain.

Updating the JRE

Update the internal JRE used by the existing utilities and JavaHost to the latest JRE version.

In Oracle Analytics Server, JRE is installed in ORACLE_HOME/oracle_common/jdk.
  1. Stop all processes (stop.sh).
  2. Rename the existing JRE directory to jre.old.
    For example: mv ORACLE_HOME/oracle_common/jdk/jre ORACLE_HOME/oracle_common/jdk/jre.old
  3. Copy an updated jre directory from an updated JDK.

    The best practice is to use the same version that you used to update the JDK. See Updating the JDK After Installing and Configuring an Oracle Analytics Server.

    For example: cp -r /usr/java/latest/jre ORACLE_HOME/oracle_common/jdk

  4. Start all processes (start.sh).
  5. Confirm that the internal utilities such as opatch work (for example, opatch version).
  6. Remove the old JRE directory ORACLE_HOME/oracle_common/jdk/jre.old.