-
Notifications
You must be signed in to change notification settings - Fork 3
Install java jdk
Asterios Raptis edited this page Apr 24, 2018
·
12 revisions
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
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
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
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"