1//if you don't have sudo add-apt-repository
2sudo apt-get install software-properties-common
3
4//install the java installar
5sudo add-apt-repository ppa:linuxuprising/java
6
7sudo apt update
8
9
10//install the newest keyservers
11su -
12
13echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/linuxuprising-java.list
14
15apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
16
17apt-get update
18
19exit
20
21
22//install latest package with recommendations
23sudo apt install oracle-java16-installer --install-recommends