How to Install JAVA 8 (JDK 8u72) on Ubuntu & LinuxMint Via PPA
Oracle JAVA 9 has been scheduled for release in Sometime in september 2016. The current stable version which we will also be installing on ubuntu in this tutorial is JAVA 8. The current version is available for download and install on oracle official download page.
The Oracle Java PPA for Ubuntu and LinuxMint is currently being maintained by Webupd8 Team. For more info on features please visit the oracle documentation page.
This post will help you to Install Oracle JAVA 8 (JDK/JRE 8u72) on Ubuntu 15.10, 14.04 LTS, 12.04 LTS and 10.04 and LinuxMint systems using PPA. To Install Java 8 in CentOS, Redhat and Fedora read This Article.
Instal Java 8 on Ubuntu
First you need to add webupd8team Java PPA repository in your system and install Oracle Java 8 using following set of commands.
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
You need to verify Installed Java Version
After yo have successfully installing oracle Java using above step verify installed version using following command.
rahul@tecadmin:~$ java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)
Configuring Java Environment
In Webupd8 ppa repository also providing a package to set environment variables, Install this package using following command.
$ sudo apt-get install oracle-java8-set-default