Installare Oracle Java 10 su Debian 9-10 via APT

Installare Oracle Java 10 su Debian 9/10 via APTInstallare Oracle Java 10 su Debian 9-10 via APT

Ci sono diversi modi per installare Oracle Java su Debian, ma quello più comodo è aggiungere i repository di Linux Uprising:

ed usare apt:

sudo apt update
sudo apt upgrade -y
sudo apt install software-properties-common
sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EA8CACC073C3DB2A
sudo apt update
sudo apt install -y oracle-java10-installer
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

output:

edmond@debianbox:~$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
0 /usr/local/oracle-java-8/jdk1.8.0_191/bin/java 1500 auto mode
* 1 /usr/lib/jvm/java-10-oracle/bin/java 1091 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode
3 /usr/local/oracle-java-8/jdk1.8.0_191/bin/java 1500 manual mode

Press <enter> to keep the current choice[*], or type selection number:

Installare Oracle Java 10 su Debian 9-10 via APT

enjoy 😉