Installing Java in ubuntu
In order to install Java 6,7,8 that are not available in Ubuntu 16.04 default directory follow the below steps
First, add Oracle's PPA, then update your package repository.
In order to install Java 6,7,8 that are not available in Ubuntu 16.04 default directory follow the below steps
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
Oracle JDK 6
To install Jdk 6 use the following command
$ sudo apt-get install oracle-java6-installer
Oracle JDK 7
To install Jdk 7 use the following command
$ sudo apt-get install oracle-java7-installer
Oracle JDK 8
This is the latest stable version of java. To install Jdk 8 use the following command
$ sudo apt-get install oracle-java8-installer