Startup Issue with Minecraft - Error with java

System Information

Field Value
Operating System Linux - Linux Lite 6.6 on x86_64
Product AMP ‘Callisto’ v2.5.0.8 (Mainline)
Virtualization QEMU_KVM
Application Minecraft
Module MinecraftModule
Running in Container No
Current State Stopped

Problem Description

Issue

How do i fix this?

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 64.0

Reproduction Steps

  • Tried different java versions
  • Tried googling
  • Tried some steps from a reddit thread that did not work

what minecraft version are you trying to run?

has been compiled by a more recent version of the Java Runtime (class file version 65.0) just means it needs Java 21