had the same problem too.. but i solved it with these commands:

sudo add-apt-repository ppa:openjdk-r/ppa  
sudo apt-get update   
sudo apt-get install openjdk-7-jre  
Answer from Chris on askubuntu.com
๐ŸŒ
Mkyong
mkyong.com โ€บ home โ€บ java โ€บ how to install java jdk on ubuntu
How to install Java JDK on Ubuntu - Mkyong.com
March 29, 2021 - ... $ sudo mkdir /opt/jdk-16 $ sudo tar -zxf ~/Downloads/openjdk-16_linux-x64_bin.tar.gz -C /opt/jdk-16 $ ls -lsa /opt/jdk-16 ls -lsa /opt/jdk-16 total 36 4 drwxr-xr-x 8 root root 4096 Mac 10 13:18 .
๐ŸŒ
Tutorials24x7
java.tutorials24x7.com โ€บ blog โ€บ how-to-install-openjdk-16-on-ubuntu-20-04-lts
How To Install Java 16 On Ubuntu 20.04 LTS | Tutorials24x7
March 31, 2021 - Selection Path Priority Status ------------------------------------------------------------ 0 /usr/java/oracle/jdk1.8.0_261/bin/javac 2 auto mode * 1 /usr/java/openjdk/jdk-15/bin/javac 1 manual mode 2 /usr/java/oracle/jdk1.8.0_261/bin/javac 2 manual mode Press <enter> to keep the current choice[*], or type selection number: Now check the priority number. I will configure JDK 16 using priority 3 as shown below. You can choose priority based on your requirements. # Configure Java Alternatives sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/oracle/jdk-16/bin/java" 3 # Configure Java sudo update-alternatives --config java # Output There are 3 choices for the alternative java (providing /usr/bin/java).
Discussions

java - How to install specific openjdk version in Ubuntu 16.04? - Stack Overflow
I have a new Ubuntu server and when I run "sudo apt-get install openjdk-8-jdk", this installed OpenJDK version "1.8.0_312", all good here. I have one more Ubuntu 16.04 server wh... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How do I install java 16 so my kids and friends can get on our old 1.16.5 Minecraft server?
If you are using ubuntu, https://ubuntuhandbook.org/index.php/2021/03/oracle-java-16-released-install-ubuntu-20-04/ More on reddit.com
๐ŸŒ r/linuxquestions
9
4
March 7, 2022
Failed to install the JDK on Ubuntu 16.04 LTS
You should already have openjdk , it comes automatically in 16.04 I believe. But if not just run sudo apt install openjdk and you should be good to go. Run sudo apt update && apt upgrade before hand More on reddit.com
๐ŸŒ r/javahelp
16
2
December 27, 2016
Problem installing openjdk-11-jdk
What Debian version? Bookworm ships openjdk-17-jdk. 11 was in buster. As to why you're running a v16 JRE, no idea, you likely have some JRE in the path or installed some weird package from outside the Debian repositories. Running which java should at least give you a hint. More on reddit.com
๐ŸŒ r/debian
6
1
September 7, 2023
๐ŸŒ
Ubuntu
packages.ubuntu.com โ€บ focal โ€บ openjdk-16-jdk
Details of package openjdk-16-jdk in focal
two or more packages specified (openjdk-16-jdk focal) Content Copyright ยฉ 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
๐ŸŒ
Tutorial for Linux
tutorialforlinux.com โ€บ step by step โ€“ openjdk 16 ubuntu 18.04 installation
Step by step - OpenJDK 16 Ubuntu 18.04 Installation โ€ข tutorialforlinux.com
April 29, 2021 - InstallingGNU/Linux Ubuntu 18.04 Installing Java OpenJDK 16 โ€“ Step by step Guide How to Install Oracle-Sun OpenJDK 16 JRE/JDK on Ubuntu 18.04 Bionic LTS 64-bit GNU+Linux desktop/server. And Java OpenJDK 16 for Ubuntu Bionic (Open Java Development Kit) is a Free and Open Source Implementation ...
๐ŸŒ
Ubuntu
launchpad.net โ€บ ubuntu โ€บ +source โ€บ openjdk-16
openjdk-16 package : Ubuntu
May 10, 2021 - OpenJDK builds (all archs) owned by PPA for OpenJDK uploads (restricted) Versions: Focal (16.0.1+9-1~20.04), Groovy (16.0.1+9-1~20.10), Bionic (16.0.1+9-1~18.04), Xenial (16.0.1+9-1~16.04), Trusty (16.0.1+9-1~14.04), Precise (16.0.1+9-1~12.04)
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 70448847 โ€บ how-to-install-specific-openjdk-version-in-ubuntu-16-04
java - How to install specific openjdk version in Ubuntu 16.04? - Stack Overflow
I have a new Ubuntu server and when I run "sudo apt-get install openjdk-8-jdk", this installed OpenJDK version "1.8.0_312", all good here. I have one more Ubuntu 16.04 server which already has OpenJDK version "1.8.0_292".
Find elsewhere
๐ŸŒ
OpenJDK
openjdk.org โ€บ install
OpenJDK: Download and install
Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux are available on release-specific pages of jdk.java.net as .tar.gz or .zip archives ยท As an example, the archives for JDK 13 may be found on jdk.java.net/13 and may be extracted on the command line using
๐ŸŒ
Linux Uprising
linuxuprising.com โ€บ 2019 โ€บ 04 โ€บ install-latest-openjdk-12-11-or-8-in.html
Install The Latest OpenJDK 17, 16, 15, 13, 11 or 8 in Ubuntu, Debian or RHEL Using Zulu OpenJDK Builds - Linux Uprising Blog
January 25, 2021 - Debian, Ubuntu, Linux Mint and Debian or Ubuntu based Linux distributions: ... sudo zypper install zulu-<version> In all cases above, <version> is the Zulu OpenJDK version, which can be 17, 16, 15, 13, 11, 8 or 7 (so the package names are: zulu-14, ...
๐ŸŒ
DigitalOcean
digitalocean.com โ€บ community โ€บ tutorials โ€บ how-to-install-java-with-apt-on-ubuntu-20-04
How To Install Java with Apt on Ubuntu | DigitalOcean
February 5, 2026 - Install Java on Ubuntu using apt. Learn how to install OpenJDK and Oracle JDK, manage versions, and configure JAVA_HOME.
๐ŸŒ
Linux Mint Forums
forums.linuxmint.com โ€บ board index โ€บ main edition support โ€บ software & applications
Install and use OpenJDK-16 - Linux Mint Forums
March 31, 2021 - You can extract it somewhere and add that directory to PATH, and make a symlink so that javac command points there. Also whenever you are using an IDE such as IntelliJ you can manually point it to the extracted location to use that JDK for your development. Try AdoptOpenJDK, it installs using apt.
๐ŸŒ
Linode
linode.com โ€บ docs โ€บ guides โ€บ install-java-on-ubuntu-16-04
Install Java on Ubuntu 16.04 | Linode Docs
May 30, 2017 - This guide shows how to install the OpenJDK 8 runtime environment to support Java app execution and development on a Linode running Ubuntu version 16.04.
๐ŸŒ
FOSS Linux
fosslinux.com โ€บ home โ€บ linux mint โ€บ how to install openjdk (java) on ubuntu
How to install OpenJDK (Java) on Ubuntu | FOSS Linux
July 21, 2020 - To help you out, we have put together a detailed guide discussing every single step to help you properly install OpenJDK on your Ubuntu PC.
๐ŸŒ
GitHub
gist.github.com โ€บ bmaupin โ€บ ff99b0cc84dd3ad8c4600374f2473184
Install openjdk-6-jdk on Ubuntu/Xubuntu 16.04 ยท GitHub
and all these on a clean 18.04 install: sudo apt-get install ttf-dejavu-extra icedtea-netx icedtea-netx-common libpng12-0 libpulse0 libasyncns0 libsndfile1 libflac8 libogg0 libvorbis0a libvorbisenc2 libatk-wrapper-java-jni libatk-bridge2.0-0 libatk-wrapper-java libatspi2.0-0 x11-utils libfontenc1 libxaw7 libxcb-shape0 libxft2 libxmu6 libxt6 libxv1 libxxf86dga1 libxpm4 libice6 libsm6 mesa-utils at-spi2-core ... on 18.04 you also need an old version of ca-certificates-java: https://packages.ubuntu.com/trusty/ca-certificates-java
๐ŸŒ
Atlantic.Net
atlantic.net โ€บ home โ€บ blog โ€บ how to install java (jre or jdk) on ubuntu 16.04
How to Install Java (JRE or JDK) on Ubuntu 16.04: A Guide | Atlantic.Net
December 14, 2025 - In this guide, you will learn how to install Java OpenJDK and Java JRE on Ubuntu 16.04 and Ubuntu 20.04.
๐ŸŒ
Ubuntu
packages.ubuntu.com โ€บ search
Ubuntu โ€“ Package Search Results -- openjdk
August 3, 2023 - plucky (25.04) (java): OpenJDK Development Kit (JDK) [universe] 25.0.1+8-1~25.04 [security]: amd64 i386 25~16ea-1 [ports]: arm64 armhf ppc64el riscv64 s390x