Skip to content
Asterios Raptis edited this page Apr 24, 2018 · 12 revisions

Overview

For install the java jdk you have to add a repository. This is the ppa:webupd8team/java. You do that with the following command:

sudo add-apt-repository ppa:webupd8team/java

No you can update:

sudo apt-get update

JDK 8 install

For install the JDK 8 and set to default you have to execute the following command:

sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

A detailed install description of install jdk8 on ubuntu is on this link webupd8.org jdk8

JDK 9 install

For install the JDK 9 and set to default you have to execute the following command:

sudo apt-get install oracle-java9-installer
sudo apt-get install oracle-java9-set-default

A detailed install description of install jdk9 on ubuntu is on this link webupd8.org jdk9

JDK 10 install

A detailed install description of install jdk10 on ubuntu is on this link linuxuprising.com jdk10

Set JAVA_HOME

There are several options to set JAVA_HOME on linux but the prefered options is to set it in the file etc/enviroment as described here

JAVA_HOME="/usr/lib/jvm/java-8-oracle"
Clone this wiki locally