LinuxGSM
LinuxGSM copied to clipboard
[Bug]: Minecraft Java v1.20.5 not starting
User story
Server is not booting due to Java Runtime error
Game
Minecraft Java
Linux distro
Ubuntu 22.04
Command
command: start, command: debug
Further information
net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
Relevant log output
linuxgsm@ca8e7fd0ae77:/app$ ./mcserver debug
Minecraft Debuging
=================================
Distro: Ubuntu 22.04.4 LTS
Architecture: x86_64
Kernel: 6.2.16-3-pve
Hostname: ca8e7fd0ae77
tmux: 3.2a
Avg Load: 0.04, 0.07, 0.06
Free Memory: 13GB
Free Disk: 27G
Game Server IP: 0.0.0.0:25565
Internet IP: 0.0.0.0:25565
Start parameters:
java -Xmx1024M -jar ./minecraft_server.jar nogui
Use debug for identifying server issues only!
Press CTRL+c to drop out of debug mode.
Warning! If mcserver is already running it will be stopped.
Continue? [Y/n] Y
[ INFO ] Debuging mcserver: Stopping any running servers
[ INFO ] Stopping mcserver: LinuxGSM is already stopped
[ OK ] Debuging mcserver: Starting debug
Error: LinkageError occurred while loading main class net.minecraft.bundler.Main
java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
[ ERROR ] Debuging mcserver: Server has stopped: exit code: 0
[ ERROR ] Debuging mcserver: Press ENTER to exit debug mode
Steps to reproduce
No response
This is happening because as of the letest Minecraft patch Java 21 is required.
I've already requestesd to update the java version used by LinuxGSM: https://github.com/GameServerManagers/LinuxGSM/pull/4562
In the meantime, run sudo apt install openjdk-21-jdk to install Java 21 (JDK).
I got the same, but managed to fix it separately by doing the same as @MicLieg suggested. Also, I think this here is identical for both versions of Ubuntu. Probably this duplicate should be removed.
https://linuxgsm.com/servers/mcserver/