Install Oracle Java 8

Ubuntu has OpenJDK installed by default, but in certain cases you might need to install Oracle Java instead. It is possible to install Oracle Java manually, however the process is a bit lengthy and requires a lot of steps.

However in this post we shall be installing Oracle Java using a ppa package maintained by the WebUp8 team. The package downloads the latest oracle java builds in the background and then installs and configures it.

In the above example OpenJDK is installed already, and is going to be replaced with Oracle Java.

The following steps should work on Ubuntu 15.10 or Linux Mint 17 and other similar Ubuntu based linux distros.

1. Setup the PPA

This first thing to do is to setup the webupd8 ppa on your system. Run the following command and proceed.

$ sudo apt-add-repository ppa:webupd8team/java
$ sudo apt-get update

After setting up the ppa repository, update the package cache as well.

2. Install the Java 8 installer

Now install the package named "oracle-java8-installer". This installer is going to download the actual Oracle JDK from the Oracle website. It should finish in a couple of minutes depending on your internet speed

$ sudo apt-get install oracle-java8-installer

After the installation is finished, Oracle Java is setup. Run the java command again to check the version and vendor.

This site, binarytides.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.