Installing Minecraft Server 1.17.1 on Ubuntu Linux with Java JDK 16

Steps needed to install Minecraft on Ubuntu


Check what version of Java you are running

java -version

# Be sure to update your packages
sudo apt update

Install Open Java JRE 16 on Ubuntu Linux

Follow these steps for the CAVES & CLIFFS: PART I Minecraft Server to run properly!

# install Java JDK 16 2021-06-08
sudo apt install openjdk-16-jre

Install Oracle Java (Minecraft site suggests this version)

Visit Ubuntu's website for instructions on installing Oracle Java:

This method is no longer working to install Oracle Java

### Do NOT use this obsolete method!
# sudo apt-get purge openjdk-*
# sudo add-apt-repository ppa:webupd8team/java 
# sudo apt-get update 
# sudo apt-get install oracle-java8-installer

Download and Install Minecraft Client on Ubuntu Linux

Minecraft Download page  

Open your terminal and enter the following commands.

mkdir minecraft
cd minecraft

Download and Install Minecraft SERVER on Ubuntu Linux

You can find the latest release here

Minecraft Server Download page

# Latest release download
wget -O minecraft_server.jar
# 1.7.4 download
wget -O minecraft_server.jar
# 1.16.5 download 2021-04-20
wget -O minecraft_server.jar
# 1.17.1 download 2021-06-08
wget -O minecraft_server.jar

Run your new Minecraft server on Ubuntu Linux

Enter the following command in your terminal to start your server.

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Agree to the Minecraft EULA

You need to agree to the EULA to run the server. Edit the eula.txt file and set eula=true. This will overwrite eula.txt with "eula=true"

echo "eula=true" > eula.txt

Update my Minecraft Server Settings

You can change the settings of your server by opening up the file.

Change the 

# or

The error I received after trying to run the new Minecraft Server 1.17.1

Error: Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/server/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at sun.launcher.LauncherHelper.checkAndLoadMain(


Visit sunny St. George, Utah, USA