
Press to keep the current choice, or type selection number: * 0 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 auto modeġ /usr/lib/jvm/java-6-oracle/jre/bin/java 1 manual modeĢ /usr/lib/jvm/java-7-oracle/jre/bin/java 2 manual modeģ /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual modeĤ /usr/lib/jvm/java-8-oracle/jre/bin/java 3 manual modeĥ /usr/lib/jvm/java-9-oracle/bin/java 4 manual mode Output There are 5 choices for the alternative java (providing /usr/bin/java). In this case, this is what the output will look like with all Java versions mentioned above installed.

The output will look something like the following. You can configure which version is the default for use in the command line by using update-alternatives, which manages which symbolic links are used for different commands. There can be multiple Java installations on one server.
#Openjdk github install
To install JDK 9, use the following command: * sudo apt-get install oracle-java9-installer There is more information about Java 9 on the official JDK 9 website. It's not recommended that you use this version because there may still be security issues and bugs. This is a developer preview and the general release is scheduled for March 2017. You can do so using the following command: * sudo apt-get install oracle-java8-installer This is the latest stable version of Java at time of writing, and the recommended version to install. To install JDK 7, use the following command: * sudo apt-get install oracle-java7-installer To install JDK 6, use the following command: * sudo apt-get install oracle-java6-installer It's not recommended to use them, but they might still be required for some programs. These are very old versions of Java which reached end of life in February 2013 and April 2015 respectively. Then, depending on the version you want to install, execute one of the following commands: Oracle JDK 6 or 7 * sudo add-apt-repository ppa:webupd8team/java
#Openjdk github update
If you need Java 6 or 7, which are not available in the default Ubuntu 16.04 repositories (not recommended), this installation method is also available.įirst, add Oracle's PPA, then update your package repository. 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.
#Openjdk github how to
Source How To Install Java with Apt-Get on Ubuntu 16.04 Introduction
