🇬🇧 English
🇬🇧 English
Appearance
🇬🇧 English
🇬🇧 English
Appearance
This page is written for:
1.20.4
This page is written for:
1.20.4
This guide will walk you through installing Java 17 on Linux.
Open a terminal, type java -version
, and press Enter.
WARNING
To use the majority of modern Minecraft versions, you'll need at least Java 17 installed. If this command displays any version lower than 17, you'll need to update your existing Java installation.
We recommend using OpenJDK 17, which is available for most Linux distributions.
INFO
For more information on installing Java on Arch Linux, see the Arch Linux Wiki.
You can install the latest JRE from the official repositories:
sudo pacman -S jre-openjdk
If you're running a server without the need for a graphical interface, you can install the headless version instead:
sudo pacman -S jre-openjdk-headless
If you plan to develop mods, you'll need the JDK instead:
sudo pacman -S jdk-openjdk
You can install Java 17 using apt
with the following commands:
sudo apt update
sudo apt install openjdk-17-jdk
You can install Java 17 using dnf
with the following commands:
sudo dnf install java-17-openjdk
If you don't need a graphical interface, you can install the headless version instead:
sudo dnf install java-17-openjdk-headless
If you plan to develop mods, you'll need the JDK instead:
sudo dnf install java-17-openjdk-devel
If your distribution isn't listed above, you can download the latest JRE from Adoptium
You should refer to an alternative guide for your distribution if you plan to develop mods.
Once the installation is complete, you can verify that Java 17 is installed by opening a terminal and typing java -version
.
If the command runs successfully, you will see something like shown before, where the Java version is displayed: