Skip to content

[Bug]: mcserver on Ubuntu 24.04 still uses OpenJDK 21 while the last Minecraft version (26.1) requires Java 25 #4889

@Huguiz

Description

@Huguiz

User story

As a LinuxGSM user on Ubuntu 24.04, I want mcserver to use Java 25 so that current Minecraft can run correctly.

Game

mcserver

Linux distro

Ubuntu 24.04

Command

command: start, command: debug

Further information

The latest version of Minecraft (26.1) requires Java 25, but the Ubuntu 24 distribution only includes version 21.

This appears related to the earlier Java version mismatch discussed in #4744.

Temporary workaround:

apt-get update
apt-get install -y openjdk-25-jre-headless

Relevant log output

...
Checking Minecraft Dependencies
=================================
2026-03-27T16:19:09.707155734Z checking GitHub ubuntu-24.04.csv ... OK
fetching GitHub [ ubuntu-24.04.csv ] ... OK
bc
binutils
bsdmainutils
bzip2
ca-certificates
cpio
curl
distro-info
file
gzip
hostname
jq
lib32gcc-s1
lib32stdc++6
openjdk version "21.0.10" 2026-01-20
pigz
python3
tmux
unzip
util-linux
uuid-runtime
wget
xz-utils
Skip! Required dependencies already installed.
Accept Minecraft EULA
=================================
You are required to accept the EULA:
https://account.mojang.com/documents/minecraft_eula
By using auto-install you are indicating your agreement to the EULA.
Installing Minecraft Server
=================================
downloading file [ minecraft_server.26.1.jar ]
2026-03-27T16:19:20.126567382Z #=#=#                                                                          
##O#-#                                                                         

##########                                                                14.5%
####################                                                      29.1%
###############################                                           44.0%
##########################################                                58.4%
######################################################                    76.0%
##################################################################        92.1%
######################################################################## 100.0%
downloading file [ minecraft_server.26.1.jar ] ... OK
clearing tmp directory [ /app/lgsm/tmp ] ... OK
Installing Gamedig
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
2026-03-27T16:19:20.537490608Z 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   746  100   746    0     0  11480      0 --:--:-- --:--:-- --:--:-- 11656
npm warn deprecated event-to-promise@0.7.0: Use promise-toolbox/fromEvent instead
npm warn deprecated mvdan-sh@0.10.1: See https://github.com/mvdan/sh/issues/1145
added 60 packages, and audited 61 packages in 3s
19 packages are looking for funding
run `npm fund` for details
2 vulnerabilities (1 high, 1 critical)
To address all issues, run:
npm audit fix
Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 11.9.0 -> 11.12.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.12.1
npm notice To update run: npm install -g npm@11.12.1
npm notice
Downloading Minecraft Configs
=================================
Downloading default configs from: https://github.com/GameServerManagers/Game-Server-Configs
fetching GitHub [ server.properties ] ... OK
cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead
copying config file [ /data/serverfiles/server.properties ] ... OK
setting hostname ... OK
generating admin/rcon password ... OK
Config Locations
=================================
Minecraft config file: /data/serverfiles/server.properties
LinuxGSM config: /app/lgsm/config-lgsm/mcserver
Config documentation: https://docs.linuxgsm.com/configuration
LinuxGSM Stats
=================================
Assist LinuxGSM development by sending anonymous stats to developers.
Collected data is publicly available: https://linuxgsm.com/data/usage
More info: https://docs.linuxgsm.com/configuration/linuxgsm-stats
The following info will be sent:
* game server
* distro
* game server resource usage
* server hardware info
auto-install leaves stats off by default. Stats can be enabled in common.cfg
Install Complete!
=================================
To start the Minecraft server type:
./mcserver start
Starting Update Checks
=================================
Warning: Step size 60 higher than possible maximum of 59
update will check every 60 minutes
Starting mcserver
=================================
fetching GitHub [ linuxgsm.sh ] ... OK
2026-03-27T16:19:32.381624064Z 
[ .... ] Starting mcserver: 
[ .... ] Starting mcserver: LinuxGSM
[ FAIL ] Starting mcserver: Unable to start LinuxGSM
Distro Details
================================================================================
Date:         Fri Mar 27 04:19:40 PM UTC 2026
Distro:       Ubuntu 24.04.3 LTS
Arch:         x86_64
Kernel:       6.1.0-42-cloud-amd64
Hostname:     minecraft-server
Environment:  docker
Uptime:       18d, 2h, 23m
tmux:         3.4
glibc:        2.39
Java:         openjdk version "21.0.10" 2026-01-20
Server Resource
================================================================================
CPU
Model:      Intel Core Processor (Haswell, no TSX)
Cores:      6
Frequency:  2394.454MHz
Avg Load:   0.72, 0.27, 0.09
Memory
Mem:       total  used   free  cached  available
Physical:  12GB   597MB  11GB  6.9GB   11GB
Swap:      0B     0B     0B
Storage
Filesystem:  overlay
Total:       99G
Used:        7.1G
Available:   88G
Network
IP:           0.0.0.0
Internet IP:  54.38.109.175
Minecraft Resource Usage
================================================================================
CPU Used:  0%
Mem Used:  0%  0MB
Storage
Total:        20M
Serverfiles:  58M
Backups:      8.0K
Minecraft Server Details
================================================================================
Server name:    LinuxGSM
Branch:         release
Server IP:      0.0.0.0:25565
Internet IP:    54.38.109.175:25565
Query enabled:  true
RCON password:  adminpFBJOixO
Maxplayers:     20
Game mode:      survival
Status:         STOPPED
Query Check:    https://ismygameserver.online/minecraft/54.38.109.175:25565
mcserver Script Details
================================================================================
Script name:       mcserver
LinuxGSM version:  v25.2.0
IFTTT alert:       off
Update on start:   off
User:              linuxgsm
Location:          /app
Config file:       /data/serverfiles/server.properties
Backups
================================================================================
No Backups created
Command-line Parameters
================================================================================
java -Xmx1024M -jar ./minecraft_server.jar nogui
Ports
================================================================================
Change ports by editing the parameters in:
/data/serverfiles/server.properties
Useful port diagnostic command:
ss -tuplwn | grep java
DESCRIPTION  PORT   PROTOCOL  LISTEN
Game         25565  tcp       0
Query        25565  udp       0
RCON         25575  tcp       0
Status:	STOPPED
Tail log files
=================================
==> /data/log/console/mcserver-console.log <==
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 69.0), this version of the Java Runtime only recognizes class file versions up to 65.0
==> /data/log/script/mcserver-script.log <==
Mar 27 16:19:32.487 mcserver: START: FAIL: Unable to start LinuxGSM
Mar 27 16:19:32.498 mcserver: START: INFO: LinuxGSM version: v25.2.0
Mar 27 16:19:32.500 mcserver: START: FAIL: core_exit.sh exiting with code: 1
tail: cannot open '/data/log/console/*script.log' for reading: No such file or directory
tail: cannot open '/data/log/script/*console.log' for reading: No such file or directory
Mar 27 16:19:37.565 mcserver: CORE: PASS: Using cached IP as public IP address
Mar 27 16:19:38.395 mcserver: DETAILS: PASS: Using cached IP as public IP address
Mar 27 16:19:40.235 mcserver: DETAILS: PASS: Using cached IP as public IP address
Mar 27 16:19:40.406 mcserver: DETAILS: INFO: LinuxGSM version: v25.2.0
Mar 27 16:19:40.407 mcserver: DETAILS: PASS: core_exit.sh exiting with code: 0

Steps to reproduce

Install a container using the LinuxGSM Minecraft Docker image : https://github.com/GameServerManagers/docker-gameserver/blob/main/docker-compose/docker-compose-mc.yml

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions