How to install Oracle Java on Ubuntu 17.04. Linux Ubuntu uers can easily install Java 8/9 or JDK/JRE on Ubuntu 17.04, Ubuntu 16.04 and other Ubuntu Derivatives.
Install the Default JRE or JDK on Ubuntu
To install the Default JRE or JDK on Ubuntu Systems, first update the package index and the run the commands accordingly:
Installing JRE
sudo apt-get update
sudo apt-get install default-jre
JDK is the Java Development Kit and needed to compile Java programs. Also note that JDK does contain the JRE.
Installing JDK on Ubuntu
sudo apt-get update
sudo apt-get install default-jdk
Install the Oracle JDK
Run the following commands to install the Oracle JDK by Oracle:
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install java-common oracle-java8-installer
Please note that during the Java installation process, you will have to accept the Oracle License agreement in order to complete the installation.