Startup Issue with Minecraft - Minecraft unable to run - JRE version issue

System Information

Field Value
Operating System Linux - Debian GNU/Linux 10 on x86_64
Product AMP ‘Phobos’ v2.6.0.6 (Mainline)
Virtualization OpenVZ
Application Minecraft
Module MinecraftModule
Running in Container No
Current State Failed

Problem Description

Issue

Our instance of minecraft does not start. It appears as if it’s trying to run on an old version of the JDK, and I am unable to figure out where to tell it to update the JDK.

When clicking on “Manage Instance”, the server returns the message “The Minecraft server stopped within 5 seconds of starting, this is not a fault with AMP - you should check your Minecraft servers log files to find out why it is unable to start.” in a popup window.

The Console returns the following log entry:
09:11:07

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

Reproduction Steps

  • Click Start button
  • Clicked on “Manage Instance”
  • Click Start Button
  • Checked Console logs

You need to select Java 21 for that version of Minecraft, not Java 17