I'm trying to set up a Minecraft server for my friends and I get the following error every time I try to launch it

Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
    net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0),
    this version of the Java Runtime only recognizes class file versions up to 55.0

(copied and pasted)

I have the current JRE available on Ubuntu (build I've tried removing all versions of JRE on my server and reinstalling only the most recent one, but I get the same error. I even updated the whole server from Ubuntu 18 to Ubuntu 20. Any help is much appreciated.

  • 1
    You haven't been specific with release details, but mention Ubuntu 18 upgraded to Ubuntu 20 - so you're using a Ubuntu Core 20 server system? (not 20.04; the year products differing to the more common year.month systems)
    – guiverc
    Commented Jun 1, 2022 at 6:24

1 Answer 1


from your error you have to know that Java 17 = class file version 61.0 Java 11 = class file version 55.0

So you need to install Java 17. By default Ubuntu have this command sudo apt install default-jre which will install some version of the JRE on your system. Now because you want exactly Java 17 you can try to execute sudo apt install openjdk-17-jre-headless. If this result in error because it is not in the Repository of Ubuntu you can check some tutorial like this to installed it manually: https://techviewleo.com/install-java-openjdk-on-ubuntu-linux/

In your system there is already Java 11. To switch which version you need: sudo update-alternatives --config java The you have to choose the number of the row with the right JVM.

Good luck to all!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .