// guide
Which Java version does my Minecraft server need?
Match Java to the Minecraft version your server runs: Java 25 for 26.1 and newer, Java 21 for 1.20.5 to 1.21.11, Java 17 for 1.18 to 1.20.4, Java 16 for 1.17, and Java 8 for 1.16.5 and older. Forge, NeoForge, Fabric and Quilt follow the same rule, because they run on top of Minecraft’s own server.
The chart
| Minecraft version | Java | Class file | Example pack |
|---|---|---|---|
| 26.1 and newer | Java 25 | 69 | All the Mods 11 (26.1.2) |
| 1.20.5 – 1.21.11 | Java 21 | 65 | All the Mods 10 (1.21.1) |
| 1.18 – 1.20.4 | Java 17 | 61 | Vault Hunters 3rd Edition (1.18.2), All the Mods 9 (1.20.1) |
| 1.17 – 1.17.1 | Java 16 | 60 | — |
| 1.16.5 and older | Java 8 | 52 | RLCraft (1.12.2) |
These come from Mojang’s own version files, which list the Java each release was built for. We last checked them on October 12, 2026: the newest release, 26.3, still lists Java 25, and so does the newest 26.4 snapshot. Minecraft moved to year-based version numbers in 2026, so 26.1 is the release after 1.21.11.
Watch the edges. 1.20.4 is a Java 17 version and 1.20.5 is a Java 21 version, even though they look almost the same. A pack’s name often hides its Minecraft version, so check the version on the pack’s page, or look it up in the per-pack table below.
Class file versions: the numbers in the error
When the Java is wrong, the server usually stops with a line like this one:
java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 69.0), this version of the Java Runtime only recognizes class file versions up to 65.0
Each Java release writes its class files with a format number one higher than the release before it, so the number minus 44 is the Java version. “Class file version 69.0” means the code needs Java 25. “Up to 65.0” means the server is running Java 21. That’s a Minecraft 26.1 or newer server started on Java 21.
| Class file | Java | Minecraft |
|---|---|---|
| 52 | Java 8 | 1.16.5 and older |
| 60 | Java 16 | 1.17 – 1.17.1 |
| 61 | Java 17 | 1.18 – 1.20.4 |
| 65 | Java 21 | 1.20.5 – 1.21.11 |
| 69 | Java 25 | 26.1 and newer |
| 70 | Java 26 | None so far |
| 71 | Java 27 | None so far |
No Minecraft release needs Java 26 or 27 (class file 70 or 71). If you see one of those numbers, either a mod was built for that Java or something on the server can’t read the class files of the newer Java you’re running. In both cases, go back to the Java in the chart.
The other common wording comes from ASM, the library loaders and Mixin use to read class files:
java.lang.IllegalArgumentException: Unsupported class file major version 69
This one is ambiguous. Sometimes a mod needs a newer Java than you run. Just as often, the server runs a Java that’s newer than its loader can read, like a 1.20.1 Forge pack started on Java 25 (see below). Our wrong Java version crash guide walks through every form of the error.
Loader notes
Forge 1.16.5 and older
Use Java 8; these servers start with java -jar on the Forge jar. On 1.12.2 and older that’s not just advice: Forge’s launcher fails on Java 9 or newer with java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader.
Forge 1.17+ and NeoForge
The installer writes run.sh and run.bat. Both start the server with a bare java @user_jvm_args.txt @libraries/.../unix_args.txt (win_args.txt on Windows), so the Java you get depends on your PATH. NeoForge’s scripts, and Forge’s for 1.17 to 1.20.2 (1.20.1 included), don’t check it at all. Forge’s scripts for 1.20.4 and newer first run java -jar forge-…-shim.jar --onlyCheckJava, which stops with “Current Java is 17 but we require at least 21” when the Java is too old, but nothing stops a Java that’s too new. user_jvm_args.txt only passes options to a Java that’s already running, so it can’t pick one either. NeoForge’s version numbers follow Minecraft: NeoForge 21.1.x is for Minecraft 1.21.1, and from 26.1 on the version starts with the Minecraft version (26.1.2.x is for 26.1.2). Our NeoForge server guide has the full setup.
Why Java 25 can break a 1.20.1 Forge pack
Mojang lists Java 17 for Minecraft 1.20.1, and that’s what 1.20.1 packs are built and tested on. Newer Java can fail in a specific way. Forge, its mod launcher and Mixin read class files with a library called ASM, and each ASM release can only read class files up to the newest Java it knows about. We read the library list in every Forge 1.20.1 installer from 47.2.0 to 47.4.26 to see which ASM each one uses:
| Forge 1.20.1 builds | ASM | Reads class files up to |
|---|---|---|
| 47.2.0 to 47.2.20 | 9.5 | Java 21 |
| 47.2.21 | 9.6 | Java 22 |
| 47.2.23 to 47.3.11 | 9.7 | Java 23 |
| 47.3.12 to 47.4.8 | 9.7.1 | Java 24 |
| 47.4.9 to 47.4.16 | 9.8 | Java 25 |
| 47.4.17 to 47.4.26 | 9.9.1 | Java 26 |
Checked on October 5, 2026, from the version.json inside each installer on Forge’s Maven. 47.4.10 is Forge’s recommended 1.20.1 build and 47.4.26 the latest. ASM’s release notes date Java 25 support to ASM 9.8, in March 2025.
Every modpack pins its own Forge build. The latest All the Mods 9 (1.1.1) pins Forge 47.4.0, and 12 of the 24 Forge 1.20.1 packs from Modrinth on our list pin a build older than 47.4.9. On Java 25, their ASM can’t read Java 25’s own class files, so the server can stop with “Unsupported class file major version 69”. A newer Forge build removes that one problem, but the pack’s mods were still only tested on Java 17. Run 1.20.1 packs on Java 17.
Fabric and Quilt
Fabric starts from a small launcher jar (java -jar fabric-server-mc.1.21.1-loader.0.18.4-launcher.1.1.2.jar nogui), so the java you type is the Java you get. Fabric mods can name the Java they need in their fabric.mod.json, and many do: in Cobbleverse 1.7.42, 67 of the 135 mods it downloads list java as a dependency. When the version doesn’t fit, Fabric Loader stops with a dependency error that names the mod and the Java it wants, instead of a crash halfway through loading. Quilt reads the same field.
The exception: GregTech: New Horizons
GT New Horizons runs on Minecraft 1.7.10 but ships two server zips: one for Java 8 and one for Java 17 to 25. Use the Java the zip was made for. GTNH’s wiki calls Java 17 the most widely tested.
How to switch Java
On a Pelican or Pterodactyl panel
Each Java is its own Docker image. On the server’s Startup page, choose the image for the Java you need under Docker Image, then restart. Nothing in your server folder changes. Hosts decide which images are offered, so if yours isn’t listed, ask them. DSN runs Pelican, so this is also how you switch Java on a DSN server.
On Windows
- Install the Java you need. Eclipse Temurin is a free build of OpenJDK: download the JRE
.msifor your version from adoptium.net. A JRE is enough to run a server; a JDK also works. The installer puts it inC:\Program Files\Eclipse Adoptium\and can add it to your PATH. - Open Command Prompt and run
java -version. The first line names the version thatjavastarts.where javalists everyjava.exeon the PATH, in the order Windows tries them. - With more than one Java installed, don’t fight over the PATH. Put the full path in your start script instead. In
run.bat, find the line that starts withjava @user_jvm_args.txtand replace that firstjavawith the full path in quotes, for example"C:\Program Files\Eclipse Adoptium\jre-21...\bin\java.exe"(copy the real folder name from that directory).
On Linux (Debian or Ubuntu)
- Install the Java you need. Adoptium’s apt repository has
temurin-8-jre,temurin-17-jre,temurin-21-jreandtemurin-25-jre; add the repository as shown on adoptium.net, then runsudo apt install temurin-21-jre(or the version you need). java -versionshows the default.update-alternatives --list javalists every installedjava, andsudo update-alternatives --config javachanges the default.- For a server that should always use one Java, put its full path in
run.shor your systemd unit instead of plainjava, so a system update can’t switch it for you.
In Docker
The itzg/minecraft-server image has a tag per Java: :java25, :java21, :java17 and :java8.
Check it worked
Run java -version exactly the way your start script calls Java (or check the image on the Startup page), then start the server. It’s up when the console prints Done (…)! For help, type "help". If it crashes later for some other reason, the System Details section of the crash report has a Java Version line showing the Java that actually ran.
Java version by modpack
Every modpack we have a guide for, grouped by the Java its latest version needs (pack data from October 4, 2026). Where a pack also has versions for older Minecraft releases, the notes say which Java those need. Each name goes to that pack's setup guide, with its RAM needs and server files.
Jump to: Java 25 · Java 21 · Java 17 · Java 8
Java 25 (6 packs)
| Pack | Loader | Minecraft |
|---|---|---|
| All the Mods 11 | NeoForge | 26.1.2 |
| Better Adventures+ (26.2)Older versions: Java 21 (1.21.1–1.21.11) | NeoForge / Fabric | 26.2 |
| Sensible MCOlder versions: Java 21 (1.21–1.21.1) | Fabric | 26.2 |
| SkyBlock PlusOlder versions: Java 21 (1.21–1.21.11) | Fabric | 26.2 |
| Technical ElectricalOlder versions: Java 21 (1.21–1.21.8), Java 17 (1.18.2–1.20.4) | NeoForge / Forge | 26.2 |
| Vanilla PerfectedOlder versions: Java 21 (1.21–1.21.11), Java 17 (1.20.1) | Fabric | 26.2 |
Java 21 (49 packs)
| Pack | Loader | Minecraft |
|---|---|---|
| All of Create Aeronautics | NeoForge | 1.21.1 |
| All Simple Voice Chat Connections | Fabric | 1.21.11 |
| All the Mods 10 | NeoForge | 1.21.1 |
| All the Mods 10 Aeronautics | NeoForge | 1.21.1 |
| All the Mods 10: To the Sky | NeoForge | 1.21.1 |
| All the Mons | NeoForge | 1.21.1 |
| Better Adventures++ (1.21.11)Older versions: Java 17 (1.19.2–1.20.1) | Fabric / Quilt | 1.21.11 |
| Better MC (BMC3) | Fabric | 1.21.1 |
| Better MC (BMC5) | NeoForge | 1.21.1 |
| Better Than Wolves Survival Rebirth (BTWSR) | Fabric | 1.21.1 |
| BlockFront | NeoForge | 1.21.1 |
| Cobblemon Academy 2.0 | Fabric | 1.21.1 |
| Cobblemon Brasil (Mobile) | Fabric | 1.21.1 |
| Cobblemon DeltaOlder versions: Java 17 (1.20.1) | Fabric | 1.21.1 |
| Cobblemon Expanded (by Jonathan)Older versions: Java 17 (1.20.1) | Fabric | 1.21.1 |
| Cobblemon IslandsOlder versions: Java 17 (1.20.1) | Forge / Fabric | 1.21.1 |
| Cobblemon Official Modpack (Fabric)Older versions: Java 17 (1.20.1) | Fabric | 1.21.1 |
| Cobblemon Official Modpack (NeoForge)Older versions: Java 17 (1.20.1) | NeoForge / Forge | 1.21.1 |
| Cobblemon Ori Starlight | Fabric | 1.21.1 |
| Cobblemon x Create | NeoForge | 1.21.1 |
| Cobblemon.ggOlder versions: Java 17 (1.20.1) | Fabric | 1.21.1 |
| Cobbleverse | Fabric | 1.21.1 |
| Craftoria | NeoForge | 1.21.1 |
| Create UltimateOlder versions: Java 17 (1.20.1) | NeoForge / Forge | 1.21.1 |
| Create: OneBlockOlder versions: Java 17 (1.20.1) | NeoForge / Fabric | 1.21.1 |
| Create+Older versions: Java 17 (1.19.2) | NeoForge / Forge | 1.21.1 |
| Enigmatica 10 | NeoForge | 1.21.1 |
| Fate's Machinery (FOM) | NeoForge | 1.21.1 |
| FTB Skies 2 | NeoForge | 1.21.1 |
| FTB StoneBlock 4 | NeoForge | 1.21.1 |
| Jornadas CobblemonOlder versions: Java 17 (1.20.1) | Fabric | 1.21.1 |
| Lost World: The Broken Script | NeoForge | 1.21.1 |
| Lucky Block ChallengeOlder versions: Java 8 (1.16.5) | NeoForge / Forge | 1.21.1 |
| One Block ModPack | Fabric | 1.21.10 |
| Origins SMPOlder versions: Java 17 (1.20.1–1.20.2) | Forge / Fabric | 1.21.11 |
| Plants vs. Zombies | Fabric | 1.21 |
| Pokemania Cobblemon | Fabric | 1.21.1 |
| RealisticCraftOlder versions: Java 17 (1.19) | Fabric | 1.21.11 |
| Remade & Remastered: Snowflakes & Sleigh Rides | Fabric | 1.21.1 |
| Shingeki no Craft Official ModpackOlder versions: Java 17 (1.20.2) | Fabric | 1.21.11 |
| Simple Realism | Fabric | 1.21.1 |
| Slimes AdventureOlder versions: Java 17 (1.19.2), Java 8 (1.16.5) | Forge / Fabric | 1.21.1 |
| The Broken Script Enhanced | NeoForge | 1.21.1 |
| The FarmOlder versions: Java 17 (1.19.1–1.20) | Fabric | 1.21.1 |
| The Pixelmon ModpackOlder versions: Java 17 (1.20.1–1.20.2), Java 8 (1.16.5) | NeoForge / Forge | 1.21.1 |
| Tools for builders | Fabric | 1.21.1 |
| Undertale | Fabric | 1.21 |
| Unstable SMP Simulator | Fabric | 1.21.11 |
| UnstableSMP - Law Fight | Fabric | 1.21.11 |
Java 17 (65 packs)
Java 8 (11 packs)
| Pack | Loader | Minecraft |
|---|---|---|
| AHZNB Modpack | Forge | 1.12.2 |
| Create: Above and Beyond | Forge | 1.16.5 |
| Mustard Virus | Forge | 1.12.2 |
| Official FiskHeroes Server | Forge | 1.7.10 |
| Official HeroPack-Verse SuperHeroes Server | Forge | 1.7.10 |
| Parasites: Reloaded | Forge | 1.12.2 |
| RLCraft | Forge | 1.12.2 |
| SkyFactory 4 | Forge | 1.12.2 |
| Supernova Empires 2 | Forge | 1.12.2 |
| The Lost Era Modpack | Forge | 1.7.10 |
| Winter Zombies | Forge | 1.12.2 |
Pack not here? Check its Minecraft version on CurseForge or Modrinth and use the chart at the top. Our guide to making a modded server covers the rest of the setup.
FAQ
Can I just install the newest Java?
Not safely. On 1.18 and newer, a newer Java often starts, but nobody tested your pack on it, and old loader builds can fail outright (see Java 25 and 1.20.1 Forge). Forge for 1.12.2 and older crashes on anything newer than Java 8. Use the version in the chart.
Which Java for Minecraft 1.20.1? 1.21.1? 26.1?
Java 17 for 1.20.1, Java 21 for 1.21.1, and Java 25 for 26.1, 26.2 and 26.3.
Can I run Minecraft 1.21.1 on Java 25?
Mojang lists Java 21 for 1.21.1, and that’s what 1.21.1 loaders and mods are built and tested against. It may start on Java 25, but then you’re the one testing it. On a server you care about, use Java 21.
What does “class file version 69.0” mean?
The code needs Java 25. If the same line says your runtime “only recognizes class file versions up to 65.0”, you’re on Java 21 with a 26.1+ server or mod. Switch the server to Java 25. If the mod is the only thing asking for 69 and your pack is older than 26.1, the mod is built for the wrong Minecraft version: replace it with the right file instead.
Do players need the same Java as the server?
No. Each side runs its own Java. The official Minecraft Launcher downloads the right Java for each version by itself (Mojang’s version files name it, for example java-runtime-delta for Java 21), which is why players rarely see this error. A dedicated server doesn’t get that help, so you choose it.
JRE or JDK?
Either. A server only needs the runtime (JRE). A JDK includes the runtime plus developer tools, so it works too.
Java is a dropdown on DSN.
Pick Java on the Startup tab of the panel, install Forge, NeoForge, Fabric or a CurseForge or Modrinth pack in one click, and get help from the owner by email or Discord. We're moving DSN Servers to new hardware, and ordering is closed until then. Join the launch list and we'll email you when servers open.