Startup Issue with Minecraft - Server cant start because of java issue

System Information

Field Value
Operating System Linux - Debian GNU/Linux 12 on x86_64
Product AMP ‘Callisto’ v2.5.0.10 (Mainline)
Virtualization Docker
Application Minecraft
Module MinecraftModule
Running in Container Yes
Current State Failed

Problem Description

Issue

This message pops up in the console after my attempt to run:
Error: A JNI error has occurred, please check your installation and try again
Exception in thread “main” java.lang.UnsupportedClassVersionError: 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 52.0

Reproduction Steps

  • redownload java
  • downloaded java 22
  • Restarted vps and my pc

Make sure that you have Java 21 or above selected under Configuration -> Java and Memory
Currently it seems that you have Java 8 selected.

Thank you that worked! Not sure why it was switched to java 8