Download the JDK/JRE:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Extract the file "
jdk-8u111-linux-x64.tar.gz" in the folder you want to install Java:
/opt/jdk1.8.0_111
Change the folder permissions:
Setup the environment variables
JAVA_HOME and
PATH:
-
Open the file ".profile":
-
Append the following lines:
-
Reload the file ".profile":
-
Verify the environment variables:
Locate the default java program file: