Linux, Windows, Virtualization, OpenSource & Blogging

Install Java JDK 8 on Ubuntu 16.04 / 14.04 / Linux Mint 17.1

Install Java JDK 8 on Ubuntu 16.04
Install Java JDK 8 on Ubuntu 16.04

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 Terminal ( Ctrl + Alt + T ).

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

$ sudo apt-get remove --purge openjdk*

Add 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 1.8.

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

While installing, you will be required to accept the Oracle binary licenses.

Verify Java version

$ java -version


java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

That’s All.


You might also like
  • Kodie Hill

    java -version returns
    “bash: /usr/bin/java: cannot execute binary file: Exec format error”

  • Troll Legend

    Thx it worked.

    • Troll Legend

      I managed to start and use Minecraft 🙂 Thy for the information once more 🙂

  • Colline Waitire


Install Java JDK 8 on Ubuntu 16.04 / 14.04 / Linux Mint 17.1