Install OpenJDK 8 on Ubuntu 14.04 LTS

Step 1: Add the OpenJDK Team Personal Package Archive (PPA)

Add the PPA:

sudo add-apt-repository ppa:openjdk-r/ppa

Once, we run the above command you should be able to see the below message on the command interface.

Install OpenJDK 8 on Ubuntu1

Step 2: The Installation

The best practice is first to update our packages

sudo apt-get update

Once, we run the above command you should be able to see the below message on the command interface.

Install OpenJDK 8 on Ubuntu2

Then install Open JDK 8 with the PPA installer:

sudo apt-get install openjdk-8-jdk

Once, we run the above command you should be able to see the below message on the command interface.

Install OpenJDK 8 on Ubuntu3

Step 3: Verify Installation

Now verify that Java is installed by typing:

java -version

You will see result similar to:

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

Once, we run the above command you should be able to see the below message on the command interface.

Install OpenJDK 8 on Ubuntu4