Updating to Java 16¶
As of Minecraft 1.17, Paper will only support Java 16 and above. This is in line with our new policy of only supporting the last two long-term-support (LTS) versions of the Java runtime. Although Minecraft 1.17 requires a Java version that is too new for any LTS, we will maintain our policy as far as possible. We will only support Java 16 and above because of Mojang Studios deciding to bump their own Java requirement with 1.17.
If you’re a developer or want to be on the safe side, pick the JDK options in the guides instead of a generic JRE. The JDK contains the JRE, in addition to development material (sources, documentation, a reference compiler, and more).
To update, please find the appropriate header for you in the table of contents.
To switch the Java version on Pterodactyl, you will require an administrator account.
The names of options will be different depending on the language you use.
Assuming you are already logged in on your administrator account, open the administrator control panel, go to the Servers tab, click on your server (this has to be repeated for every server you wish to switch the Java version of), and press the Startup tab.
Proceed by replacing the text in the Image input field under Docker Container
Configuration with the following:
You can also replace
11 for Java 11.
To install Java 16 on Debian, Ubuntu, and the plethora of other distributions based on these, execute the following commands to add the AdoptOpenJDK APT repository and to install AdoptOpenJDK Hotspot:
$ sudo apt update $ sudo apt install apt-transport-https software-properties-common gnupg wget $ wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - $ sudo add-apt-repository https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ $ sudo apt update $ sudo apt install adoptopenjdk-16-hotspot
You can also replace
11 for Java 11.
There is no JRE-only Java 16 package for Arch Linux. This is not an issue whatsoever, but if you’d like the smaller variant, you can use the Linux (Generic) guide instead.
To install Java 16 on Arch Linux, you will need to use the Arch User Repository
(AUR). You need to install the
To simplify this process, and to make updating easier, see yay.
To switch between available Java versions on the system, see the wiki on Switching between JVMs.
You should check with your distribution’s package manager(s) before using
this section of the guide. It is very likely you can find a suitable Java
version if you search its repositories for
Install SDKs with ease! Wa-pow! Luckily SDKMAN! is written in
bash, so you
can use this on practically any Linux (and BSD!) environment. Follow the
installation instructions on their website.
You can then proceed to install one of their many Java distributions with the simple commands on their website.
This assumes an intermediate to advanced Linux user. Ask for help if you
need it; we don’t want you to harm your system.
#paper-help on Discord is a fitting
channel for asking, and remember: don’t ask to ask, just ask.
You are going to require the
sha256sum tools to do this install.
First, select an appropriate
tar.gz file from AdoptOpenJDK’s website,
and copy the download URL.
Next, figure out which directory you want to install Java to; this is commonly a
/usr/lib/jvm. The tar file you copied the URL to has an
inner directory, so you don’t need to create one yourself.
Download the file with one of the following commands:
curl -LJO "replace this text with the URL"
wget "replace this text with the URL"
And get the signature from pressing the
Checksum (SHA256) button next to the
.tar.gz download button. This should be the same as displayed in the second
column, output from running
sha256sum "the downloaded file path goes here".
If they are not the same, delete the files and re-download them.
Next up, extract the file with:
tar xzf "the downloaded file path goes
here". There should now be a directory named something like
You can safely delete the
tar.gz file if this is the case.
Now you should add an environment variable called
JAVA_HOME pointing to the
directory you created (e.g.
/usr/lib/jvm/jdk-16.0.1+1; note there is no
trailing slash here):
# cat <<EOF | tee /etc/profile.d/java.sh export JAVA_HOME=/usr/lib/jvm/jdk-16.0.1+1 export PATH=$JAVA_HOME/bin:"$PATH" EOF # chmod +x /etc/profile.d/java.sh
# at the start means this has to be run as either
root, or an
account that has access to the
/etc/profile.d/ directory. To avoid this,
you can replace
sudo tee (or
doas tee on BSD),
sudo chmod (or
doas chmod on BSD).
You must now source the new file you created, which is usually done at the start
of a shell, so you can just re-open the shell. Alternatively, run
If you’re on Windows 10, you will want AdoptOpenJDK’s JRE. You can find the
msi file you should install on their website.
Remember to reboot your computer after installing.
If you now open a new PowerShell prompt and do
java -version, it should say
something along the lines of:
openjdk version "16.0.1" 2021-04-20 OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9) OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
It is the
version "16.0.1" part that is important – if the first number is
16, you need to modify your
Press your Windows button and search (just start typing)
Edit the system environment variables result is the one
Environment Variables... button:
JAVA_HOME variable on the bottom half and press
if the variable is not present, create a new variable with
New... in the
lower half of the window, and name it
JAVA_HOME. You now want to
Directory... and find the Java directory under
Files\AdoptOpenJDK in the Windows Explorer window:
Now go to your
Path variable in the lower window and press
If there is already a
%JAVA_HOME%\bin entry in the list, skip this step.
Otherwise, press the
New button at the top and enter
If you now open a new PowerShell window, you should have the correct output. If
not, restart your computer and try again. If it is still wrong, ask for help in
#paper-help on Discord to get further assistance.
macOS / OS X¶
To now install Java, open your Terminal app and run the following two commands:
$ brew tap AdoptOpenJDK/openjdk $ brew install --cask adoptopenjdk16-jre
You can find the complete list of available Java versions on the GitHub page of the Java tap.