When prompted, type y for yes to confirm the installation. 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 Debian. The last section outlines setting the JAVA_HOME environment variable Prerequisites
If you decide to install multiple versions of Oracle Java, you can follow the section on managing Java. This tutorial provides different ways of installing Java on Debian 8: you can download the Default JRE or JDK or the Oracle JDK. The programming language Java and the Java virtual machine or JVM are used extensively and required for many kinds of software.