Learn How To Install Java 8 on Ubuntu 14.04

February 25, 2020

Table of Contents

This guide assumes you have a brand-new Ubuntu 14.04 VPS from IT Web Services, using root. If you aren’t logged in as root, type

su -

then enter your root password. You will be logged into the root account.

Java 8 is a 2014 update to Java that includes security updates, performance updates, and new programming enhancements. Some of the new enhancements include lambda expressions, date and time API, and the Nashhorn JavaScript engine.

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.

add-apt-repository ppa:webupd8team/java

Step 2: Update the repository list

apt-get update

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:

java -version

… 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.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!