Java version errors
Errors like "Unsupported class file major version" or "requires Java 21".
The Java version does not match: Versions sets the right Java for the Minecraft version, and plugins need a Java at least as new as they were built for.
Before you start: The error message.
Step by step
- Open Versions and reinstall your current software and version: this resets the Java image to the right one.
- Class file major version 65 = Java 21, 61 = Java 17, 52 = Java 8. If a plugin needs a newer Java than your Minecraft version uses, get an older build of the plugin.
- Old Minecraft (1.16 and below) needs Java 8 or 11; very new plugins will not run there.
- Restart and check the console.
- If you changed the Docker image or startup command by hand, set it back.
- Check the plugin page for which Java it needs; most modern plugins state it in their requirements.
Check it worked: No Java errors on startup.
Why it happens: Each Minecraft version needs a minimum Java (1.20.5+ needs Java 21), and newer plugins need newer Java.
More guides on Crashes, startup failures, and errors: