

If you want to install the Oracle JDK, which is the official version distributed by Oracle, you will need to follow a few more steps.

You can install the JDK with the following command: * sudo apt-get install default-jdk The JDK does contain the JRE, so there are no disadvantages if you install the JDK instead of the JRE, except for the larger file size. The JDK is usually only needed if you are going to compile Java programs or if the software that will use Java specifically requires it. There is another default Java installation called the JDK (Java Development Kit). Specifically, this command will install the Java Runtime Environment (JRE). Specifically, this will install OpenJDK 8, the latest and recommended version. The easiest option for installing Java is using the version packaged with Ubuntu. To follow this tutorial, you will need: Installing the Default JRE/JDK This article will guide you through the process of installing and managing different versions of Java using apt-get. Java and the JVM (Java's virtual machine) are widely used and required for many kinds of software. Source How To Install Java with Apt-Get on Ubuntu 16.04 Introduction
