Creating and using Environment Variables
For the full "DLP Quick Install Guide" please visit the following link: DLP Quick Install Guide
Windows
Creating and using environment variables is a pre-requisite for installing Oracle, Enforce, and Detection Servers.
VERSION DISCLAIMER: <DLPversion> = 15.8, 16.0, 16.0.1 or 16.0.2 |
Open the Environment Variables:
1 - Open File Explorer
2 - Right-click on "This PC"
- Select the "Properties" option
3 - Select "Advanced System Settings" on the right side of the screen
4 - Click on the "Environment Variables" button
5 - We always want to work in the "System Variables" section so that these variables apply to all users.
The variables that you will set, will depend on the server you are working on:
Oracle: ORACLE_HOME
Enforce: JAVA_HOME, ORACLE_HOME
Detection: JAVA_HOME
Create a New System Variable:
6 - Click on the "New" button at the bottom to create a new System Variable
- For the most part, creating the "New" variable just literally creates the variable for use, but does not actually use it.
- For the Environment Variable to be used, it needs to be added to the "Path" System variable list after it is created (this step will be covered later).
7- Fill out the fields, these should always be upper case separated by an underscore (this is done purely for consistency)
- The "value" should be the installation location stopping at the folder prior to the "\bin" directory.
Default JAVA_HOME Path: C:\Program Files\AdoptOpenJRE\<JREversion>-jre
Enforce Server - Default ORACLE_HOME Client Path: C:\oracle\product\<ORACLEversion>\client_1
Oracle Server - Default ORACLE_HOME Database Path: C:\oracle\product\<ORACLEversion>\db1
- Note that for the ORACLE_HOME variable, on the Oracle server this path will end in some variation of "db1" which represents the database, while on the Enforce server it will end in some variation of "client_1" which represents the Oracle Client.
After these variables have been created, you will now need to add them to the "Path" variable in order for the OS to use these new variables:
8 - Double-click on the "Path" variable to edit it.
** This is a list of locations that the OS will automatically check when you run a command. Adding "JAVA_HOME" and "ORACLE_HOME" allows java and oracle commands to be run.
9 - Click on "New" to add a new Environment Variable to the path list.
** This will make a new line editable. To reference the variable we created use the variable name surrounded by % signs.
10 - %ORACLE_HOME% will use the variable we defined as "ORACLE_HOME". This will translate into the exact "value", in this case the path that we defined in the variable earlier.
- Since the "Path" list is a list of locations for the OS to search for commands, we want to be sure to append the \bin at the end of the variable name as that is where the application will store its commands.
%JAVA_HOME%\bin
%ORACLE_HOME%\bin
11 - Once, these have been added, make sure to move them to the top of the list, so these locations are checked first as the OS starts at the top and works its way down the list until it finds a match or reaches the end of the list.
- Once everything has been added, you should see the Path variable, with the Oracle and Java home values at the front of the list.
Test the environment variables to make sure they are set correctly:
12 - To test the ORACLE_HOME environment variable, you can simply open up CMD and type in "ECHO %ORACLE_HOME%" and it should display the ORACLE_HOME directory...
13 - To test JAVA_HOME run the following two tests:
java -version
"this should return the correct java version to you."
Whereas
where java
"will tell you the location where java was installed"
Your environment variables are now setup.