Install Oracle Java JDK 8 on Ubuntu 16.04 / Linux Mint 19/18

5

As already you know, Canonical no longer redistribute Oracle Java packages due to license issue. Canonical has removed the Java packages from their repository, and now they distribute OpenJDK as an alternative. If you need Oracle Java on Ubuntu; you must do the installation through an external repository.

Here is the tutorial on installing Java JDK 8 on Ubuntu 16.04

This tutorial should work on previous versions of Ubuntu such as Ubuntu 14.04 / 14.10 / 15.04 / 15.10 and newer versions such as Ubuntu 16.10 / 17.04.

Open a terminal ( Ctrl + Alt + T ).

Remove the OpenJDK from the system, if you have it already installed.

sudo apt-get remove --purge openjdk*

Add the repository.

sudo add-apt-repository -y ppa:webupd8team/java

Run the following command to pull the packages information from the newly added repository.

sudo apt-get update

Issue the following command to install Java JDK 8.

sudo apt-get -y install oracle-java8-installer

During the installation, you may need to accept the Oracle binary licenses.

Verify Java version

java -version

Output:

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

That’s All.

Further Reading

You might also like

Install Oracle Java JDK 8 on Ubuntu 16.04 / Linux Mint 19/18

5