Startup Issue with Minecraft - Troubles starting the server

System Information

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

Problem Description

Issue

Exception in thread “main” java.lang.IllegalAccessError: class cpw.mods.modlauncher.SecureJarHandler (in unnamed module @0xf8c1ddd) cannot access class sun.security.util.ManifestEntryVerifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0xf8c1ddd is the error message

Reproduction Steps

  • Was adding and removing Mods
  • then I had curseforge client mismatch
  • updated client to 1.16.5 to match the required one for me and then It fails 5 sseconds after trying to start server

Forge 1.16.5 needs Java 8, or sometimes Java 11 to run.