๐ŸŒ
HowtoForge
howtoforge.com โ€บ home โ€บ install java 16 (openjdk 16) on rocky linux 8
Install Java 16 (OpenJDK 16) on Rocky Linux 8
In this post, we will show you how to install OpenJDK 16 and Oracle JDK 16 on Rocky Linux 8.
๐ŸŒ
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 ... The openjdk-8-jre package contains just the Java Runtime Environment. If you want to develop Java programs then please install the openjdk-8-jdk package.
Discussions

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
raspbian - Installing OpenJDK 16 on Raspberry Pi 4 - Raspberry Pi Stack Exchange
I am trying to install OpenJDK 16 on my Raspberry Pi 4. I'm running a minecraft server and there was an update recently which requires Java 16, but I have Java 8 installed. There is no openjdk-16-jdk package so I downloaded the tar file for Linux / AArch64 as the Pi has an ARM processor. More on raspberrypi.stackexchange.com
๐ŸŒ raspberrypi.stackexchange.com
June 8, 2021
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
How to install Java?
I think the first command will install the LTS version, which is currently 11. This has always been confusing on Debian distros. Are you just running java? Or are you looking to build new java code? Install the jdk if you want to build, not the jre. More on reddit.com
๐ŸŒ r/pop_os
4
5
February 25, 2020
๐ŸŒ
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 .
๐ŸŒ
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 ...
๐ŸŒ
LinuxCapable
linuxcapable.com โ€บ home โ€บ debian โ€บ how to install java 16 (openjdk 16) on debian 11
How to Install Java 16 (OpenJDK 16) on Debian 11 - LinuxCapable
August 31, 2021 - Visit the downloads page to get the latest build version link, then use the following curl command: curl -O https://download.java.net/java/GA/jdk16.0.2/d4a915d82b4c4fbb9bde534da945d746/7/GPL/openjdk-16.0.2_linux-x64_bin.tar.gz
๐ŸŒ
Linux Mint Forums
forums.linuxmint.com โ€บ board index โ€บ main edition support โ€บ software & applications
Install and use OpenJDK-16 - Linux Mint Forums
March 31, 2021 - I can download and extract the binaries from http://jdk.java.net/16/ but i did not find a guide/explanation to make it visible for the system (for Linux), so that I can compile code.java with ... javac code.java Normally (for versions available in the repository) I would install the packages (example for version 11: openjdk-11-jre openjdk-11-jdk openjdk-11-demo openjdk-11-doc openjdk-11-jdk-headless openjdk-11-jre-headless openjdk-11-source) and run
๐ŸŒ
Shapehost
shape.host โ€บ home โ€บ resources โ€บ java 16 (openjdk 16) installation guide: rocky linux 8
Java 16 (OpenJDK 16) Installation Guide: Rocky Linux 8 - Shapehost
November 28, 2023 - First, itโ€™s essential to update ... Once the update is complete, proceed to the next step. To install OpenJDK 16, youโ€™ll need to download it from the official website....
๐ŸŒ
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 - How To Install Oracle Java 14 (JDK 14) On Ubuntu, Debian Or Linux Mint From APT PPA Repository ยท Zulu OpenJDK 17, 16, 15, 13, 11, 8 or 7 builds for Windows, macOS and Linux can be downloaded from this page. On Linux there are binaries available as DEB, RPM and .tar.gz (64bit).
Find elsewhere
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
Contabo
contabo.com โ€บ home โ€บ how to install java on ubuntu 18.04, 20.04 & 22.04 using apt-get
How To Install Java on Ubuntu 18.04, 20.04 & 22.04 using Apt-Get
August 11, 2023 - apt-get install openjdk-8-jre โ€“y ยท Installing the Java 16 JDK or JRE are again very easy and can be done with one single command. For Java 16 JDK this command would be: apt-get install openjdk-16-jdk โ€“y ยท And for Java 16 JRE it would be: ...
๐ŸŒ
TecMint
tecmint.com โ€บ home โ€บ java โ€บ how to install java 16 in rocky linux and almalinux
How to Install Java 16 in Rocky Linux and AlmaLinux
August 2, 2021 - To get started, we need to confirm that Java is not yet installed by running the following command. ... Next, we are going to download the OpenJDK 16 binary file which comes as a tarball file using the following curl command. $ curl -O https://download.java.net/java/GA/jdk16.0.2/d4a915d82b4c4fbb9bde534da945d746/7/GPL/openjdk-16.0.2_linux-x64_bin.tar.gz
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
OpenJDK
openjdk.org
OpenJDK
Learn about the key active Projects in the Community including Amber (high-productivity language features), Babylon (foreign programming models), Leyden (better startup and warmup), Loom (lightweight concurrency), Panama (foreign functions and foreign data), Valhalla (primitive types and ...
๐ŸŒ
OpenJDK
openjdk.org โ€บ projects โ€บ jdk โ€บ 16
JDK 16
JDK 16 is the open-source reference implementation of version 16 of the Java SE Platform, as specified by by JSR 390 in the Java Community Process ยท JDK 16 reached General Availability on 16 March 2021. Production-ready binaries under the GPL are available from Oracle; binaries from other ...
Top answer
1 of 3
8

I wrestled with the same issue a few days ago.

I have been running a Minecraft server on a Raspberry Pi 4, using Java 8, installed via sudo apt install openjdk-8-jdk.

However, as of snapshot 21w19a, which was a few snapshots before the 1.17 release, Java 16 has become the minimum for Minecraft.

The Java 16 binary in the openjdk-16.0.1_linux-aarch64_bin.tar.gz file I downloaded from http://jdk.java.net/16/ gives an error when run on my Raspberry Pi 4:

$ ./jdk-16.0.1/bin/java --version
-bash: ./jdk-16.0.1/bin/java: cannot execute binary file: Exec format error

If we use file on that binary, we can see a bit more detail:

$ file ./jdk-16.0.1/bin/java
./jdk-16.0.1/bin/java: ELF 64-bit LSB shared object, ARM aarch64,
version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1,
for GNU/Linux 3.7.0, not stripped

Note "64-bit" and "ARM aarch64".

Compare this with the working Java 8 binary I have - note "32-bit" here:

$ file /usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java
/usr/lib/jvm/java-8-openjdk-armhf/jre/bin/java: ELF 32-bit LSB executable, ARM,
EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3,
for GNU/Linux 3.2.0, BuildID[sha1]=6d2781f51a497603976e8fee28b888bd771fd5b7, stripped

I believe (I'm no expert) that the Raspberry Pi 4 CPU is able to run aarch64 code, but the current default OS doesn't support it.

$ uname -a
Linux [name] 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux

There, note armv7l.

This article - "How to Make Your Raspberry Pi 4 Faster with a 64 Bit Kernel" helped me to understand a little more. If I read that right, although we could edit /boot/config.txt to include the arm_64bit=1, that would give us a 64 bit kernel, but not the ability to run 64 bit aarch64 binaries, because we still have a 32 bit userland. (If I've misunderstood here, I'd appreciate if someone could correct me so I can learn.)

So, summary so far: Oracle supply a Java 16 JDK at jdk.java.net, but the only ARM binary there is aarch64. I think this may be supported by the processor on the Raspberry Pi 4, but not by the default OS.

Luckily, AdoptOpenJDK (run by a community of Java User Group members, including some big names) seem to make a wider variety of Java binaries available for download.

I went to https://adoptopenjdk.net/releases.html and made the following choices:

  • Version: OpenJDK 16 (Latest)

    • Chose because Java 16 is the minimum for Minecraft 1.17 (see top of post).
    • Note this isn't a "Long Term Support" (LTS) version. This Minecraft Paper server post about Java 16 explains more.
  • JVM: HotSpot

    • The alternative option here is OpenJ9, but I believe that Mojang ship and test Minecraft with the HotSpot JVM, so that's what I chose.
  • Operating System: Linux

  • Architecture: arm32

    • Not aarch64: see above
  • JDK or JRE: JRE

    • To run Minecraft, all we need is a java binary. So the Java Runtime Environment (JRE) is fine. The Java Development Kit (JDK) includes more tools, but the JRE is a smaller download and installation, so I went for that. See this question for more on JDK vs JRE.

Those choices have given me a working Java 16:

$ ./jdk-16.0.1+9-jre/bin/java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode)
$ file ./jdk-16.0.1+9-jre/bin/java
./jdk-16.0.1+9-jre/bin/java: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0,
not stripped

... and this is working so far for me, in the limited testing I've done so far, with the vanilla 1.17 server JAR I downloaded from https://www.minecraft.net/en-us/download/server.

2 of 3
2

I did the following and it worked for me (To install openjdk 16 for minecraft 1.17.1):

First I downloaded any jdk by using:

sudo apt install openjdk-8-jdk

Then I downloaded this file and extracted it in a new folder under /usr/lib/jvm

After that I runned:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/{name of the folder you just created}/bin/java 1131

And then I checked it was installed and selected by using:

sudo update-alternatives --config java