This guide assumes you have a brand-new Ubuntu 14.04 VPS from AKLWEB Host, using root. If you aren’t logged in as root, type
then enter your root password. You will be logged into the root account.
Step 1: Add the repository
At the time of writing, Java 8 is not in the sources list by default, so we have to add the “Webupd8” repo, which contains Java 8.
Step 2: Update the repository list
Step 3: Install
Run the following command to install Java 8:
apt-get install oracle-java8-installer
During the installation, you will need to agree to the Oracle license. This is as simple as selecting “yes” and hitting “enter”.
Step 4: Verify installation
Execute this command to check that the installation was successful:
… and you will output similar to the following (depending on the current version of Java 8).
java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
And you’re good to go! Java 8 is now installed on your Ubuntu VPS.