Install Java 8 JDK on Ubuntu

In this tutorial you will learn how to install latest Java 8 on Ubuntu or LinuxMint via PPA.

java-featured-image

If you are using Windows please check the Windows Java installation guide instead.

The Oracle Java PPA installation works on Ubuntu 18.04 LTS, 16.04 LTS, 15.10, 14.04 LTS, 12.04 LTS and LinuxMint distributions.

First add the PPA repository

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

After completing the installation you can verify it by typing

$ java -version

You should see similar output (depending on your Java version)

Verify Java installation

Verify Java installation

The PPA repository also provides a utility to set up your environment variables:

$ sudo apt-get install oracle-java8-set-default

 




0 0 vote
Article Rating
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
4 years ago

I tried this but there was no JDK that came down with java 8 u101. I see the JRE but no JDK ? What is happening ?

filip
Admin
4 years ago
Reply to  ilium007

can you please share the output of $ java -version command?