Fix "Unsupported class file major version" (wrong Java)
The server jar, a plugin or a mod was built for a newer Java than the one running it. Pick the Java version your Minecraft version needs and restart.
The server stops right at start with something like:
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 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0Mod loaders and some tools phrase it as Unsupported class file major version 65. Both mean the same thing.
Read the numbers #
The first number is the Java the file needs, the second is the Java you have. Java version = class file version − 44:
| Class file version | Java |
|---|---|
| 52 | Java 8 |
| 60 | Java 16 |
| 61 | Java 17 |
| 65 | Java 21 |
| 69 | Java 25 |
So "class file version 65.0 … up to 61.0" means: needs Java 21, running Java 17.
Which Java your Minecraft version needs #
| Minecraft version | Java |
|---|---|
| 1.12 – 1.16.5 | Java 8 (or newer, see below) |
| 1.17 – 1.17.1 | Java 16 or newer |
| 1.18 – 1.20.4 | Java 17 or newer |
| 1.20.5 – 1.21.11 | Java 21 or newer |
| 26.1 and newer | Java 25 or newer |
This is the Minecraft Wiki's list; PaperMC recommends the same versions for Paper. Newer Java usually runs older Minecraft fine, but old modpacks are the exception: Forge for 1.16.5 and earlier was built for Java 8 and often crashes on newer Java with errors about modules or access. For those, use Java 8.
How to fix it on ESN #
- Find your Minecraft version: the first lines of the console, or the Minecraft Version variable on the Startup page.
- Open Startup → Docker Image and pick the Java version from the table.
- Restart the server and watch the console.
- If the Java you need isn't in the list, ask in the ESN Discord or open a ticket.
When it's a plugin or mod, not the server #
If the server starts but one plugin fails with this error, that plugin was built for a newer Java than your server runs. The log line names it, for example Could not load 'plugins/Example.jar'. Either move the server to newer Java (if your Minecraft version supports it), or download the plugin build made for your version. The same applies to mods: a mod for 1.21 needs Java 21 and won't load on a 1.20.1 server anyway. Version problems with plugins are covered in Unsupported API version.
Updating Minecraft at the same time? #
Changing Java is safe. Changing the Minecraft version is not reversible: once a world loads on a newer version, it can't go back. Download a copy of your world first (see backups), then follow changing a Minecraft version, and check every plugin or mod has a build for the new version.
ESN Hosting facts
- Company: ESN Systems (ESN Hosting), esnoffical.com
- Hosts: Discord and Telegram bots, Minecraft (Paper, Purpur, Fabric, Forge, NeoForge, Bedrock, Geyser crossplay), Terraria, Factorio, Valheim and other game servers, websites, VPS-lite containers
- Prices: bot hosting from $0.50/month; Minecraft-ready plans from 1 GB ($0.99/month) up to 16 GB ($19.99/month); full list at panel.esnoffical.com/plans
- Bot languages: Python, Node.js, Java, TypeScript, Go, Rust, C# and more
- Server location: United States (Chicago and New York)
- Billing: monthly or yearly in USD through Stripe, cancel any time
- Panel: web console, file manager, SFTP, schedules, subusers, built-in importer
- Support: ESN Systems Discord and live chat on the panel
FAQ #
What Java does Minecraft 1.21 need?
Java 21 or newer. 1.20.5 through 1.21.11 all require Java 21.
What Java does Minecraft 26.1 need?
Java 25 or newer, according to Mojang's 26.1 release notes.
Can I just use the newest Java for everything?
For Paper, Purpur, Fabric and modern Forge or NeoForge, usually yes. Old Forge modpacks for 1.16.5 and earlier need Java 8.
What does class file version 65 mean?
It needs Java 21. Class file version minus 44 is the Java version.
My old Forge modpack crashes on Java 17 or 21. Why?
Forge for Minecraft 1.16.5 and older was built for Java 8. Pick Java 8 in the Docker Image box for those packs.
Does changing the Java version touch my world?
No. Java only runs the server. Your world and settings stay as they are; only changing the Minecraft version changes the world.
Sources: Minecraft Wiki: required Java version by Minecraft version (checked Nov 3, 2026) · PaperMC docs: recommended Java version per Paper version (checked Nov 3, 2026) · Minecraft.net: Java Edition 26.1 (requires Java 25) (checked Nov 3, 2026)
Still stuck? Use the live chat on the panel or ask in the ESN Systems Discord. Last updated November 3, 2026.