i

JAVA Complete Course

Java On Linux

Unlike on windows, where we can install Java with wizard, on Linux we need to run appropriate commands. First of all, we need to be sure that we don’t have any OpenJDK/JRE in our system. To make it sure, we need to run delete command for them:

During the process we will be asked if we are sure about our command and we need to agree by typing “Y”.

Next step is to download Java archive file to our system from http://java.com and click on the Download button.

Note that after downloading the file we need to login to our system as a root to install Java.

Next step is to change the directory in which we want to install Java with the following command

We need to move our downloaded tar.gz file to the current directory and then unpack (unzip) it with the following command:

The Java files are installed in a directory called jre1.8.0_73 in the current directory. In this example, it is installed in the /usr/java/jre1.8.0_73 directory. When the installation has completed, you will see the word Done.