[GH-ISSUE #4744] [Bug]: mcserver is using JRE class file version 65 but LGSM installs 61 on Deb12 #2941

Open
opened 2026-02-27 03:06:26 +03:00 by kerem · 1 comment
Owner

Originally created by @DerDomml on GitHub (Jan 8, 2025).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4744

User story

I want to install mcserver and all its dependencies using LinuxGSM so that I can start it

Game

Minecraft

Linux distro

Debian 12 (minimal)

Command

command: start

Further information

Upon installing the dependencies from the list given by ./mcserver install, I get [ FAIL ] Starting mcserver: Unable to start Server!. Manually starting the minecraft server reveals the message 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

After manually installing JDK version 23.0.1 using wget https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.deb && sudo dpkg -i ./jdk-23_linux-x64_bin.deb && rm ./jdk-23_linux-x64_bin.deb, the server starts normally again.

There was also one package in the dependencies which seems to not exist anymore when using apt install <dependencies>, but unfortunately I do not remember that. It is not being checked for when installing the server but was in the apt install command printed out by it.

Maybe the dependency list for mcserver needs an update?

Best regards
Domml

Relevant log output

No response

Steps to reproduce

  1. Have Debian 12 (I am using minimal)
  2. Follow the steps from the Install section at the LGSM Minecraft Server site
  3. Install the dependencies listed by the ./mcserver install command
  4. Start the server with ./mcserver start
  5. See that the server won't start because of the java version mismatch in the newest Minecraft version and Debian 12's default-jdk (Java 21 vs Java 17)
Originally created by @DerDomml on GitHub (Jan 8, 2025). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4744 ### User story I want to install mcserver and all its dependencies using LinuxGSM so that I can start it ### Game Minecraft ### Linux distro Debian 12 (minimal) ### Command command: start ### Further information Upon installing the dependencies from the list given by ./mcserver install, I get `[ FAIL ] Starting mcserver: Unable to start Server!`. Manually starting the minecraft server reveals the message `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` After manually installing JDK version 23.0.1 using `wget https://download.oracle.com/java/23/latest/jdk-23_linux-x64_bin.deb && sudo dpkg -i ./jdk-23_linux-x64_bin.deb && rm ./jdk-23_linux-x64_bin.deb`, the server starts normally again. There was also one package in the dependencies which seems to not exist anymore when using `apt install <dependencies>`, but unfortunately I do not remember that. It is not being checked for when installing the server but was in the apt install command printed out by it. Maybe the dependency list for mcserver needs an update? Best regards Domml ### Relevant log output _No response_ ### Steps to reproduce 1. Have Debian 12 (I am using minimal) 2. Follow the steps from the **Install** section at [the LGSM Minecraft Server site](https://linuxgsm.com/servers/mcserver/) 3. Install the dependencies listed by the `./mcserver install` command 4. Start the server with `./mcserver start` 5. See that the server won't start because of the java version mismatch in the newest Minecraft version and Debian 12's default-jdk (Java 21 vs Java 17)
Author
Owner

@dgibbs64 commented on GitHub (Jan 8, 2025):

So to be clear
Debian 12 "bookworm" only has openjdk-17 as the highest version available in its repo
Debian 13 "trixie" (in development) has up to openjdk-24
Ubuntu 22.04 and above has openjdk-21

Minecraft now requires at least openjdk-21 to run.

Debians mindset is for slower released and stability over the latest versions of stuff. This can cuase issues somtimes as game dev's often use newer dependencies that Debian can provide.

Looks like Mojang has taken to decision to not support debian 12 (although it can be done manually) and has probably built their binaries with Ubuntu 24.04 in mind.

I prefer not to have LinuxGSM doing fancy things with dependencies unless absolutely required.

So the currently suggestions are

  1. Use a distro that has Java 21 such as Ubuntu 24.04
  2. Use the docker image that is built on Ubuntu
  3. Manually install Java 21 (like you have already done)

From a LinuxGSM perspective, there is not a lot we can do about this issue and we just need to wait for the next Debian release

<!-- gh-comment-id:2577656836 --> @dgibbs64 commented on GitHub (Jan 8, 2025): So to be clear Debian 12 "bookworm" only has openjdk-17 as the highest version available in its repo Debian 13 "trixie" (in development) has up to openjdk-24 Ubuntu 22.04 and above has openjdk-21 Minecraft now requires at least openjdk-21 to run. Debians mindset is for slower released and stability over the latest versions of stuff. This can cuase issues somtimes as game dev's often use newer dependencies that Debian can provide. Looks like Mojang has taken to decision to not support debian 12 (although it can be done manually) and has probably built their binaries with Ubuntu 24.04 in mind. I prefer not to have LinuxGSM doing fancy things with dependencies unless absolutely required. So the currently suggestions are 1. Use a distro that has Java 21 such as Ubuntu 24.04 2. Use the docker image that is built on Ubuntu 3. Manually install Java 21 (like you have already done) From a LinuxGSM perspective, there is not a lot we can do about this issue and we just need to wait for the next Debian release
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2941
No description provided.