Page History
...
To set the environmental variables in Linux, follow these steps:
As the root user, enter the following in the /etc/profile file. A PATH variable should already be created in this file, so be sure to define the JAVA_HOME and export before the PATH export.
ReplaceReplace
with the<some_path>
with the correct path fragment for Java installations.
Code Block export JAVA_HOME=<some_path>/jdk1.8.0_101
export PATH=$JAVA_HOME/bin:$PATH
Log out and log back in so that the system recognizes your changes.
Verifying the Environment Variables in Linux
...