// 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.

Updated  ·  Java Edition  ·  Forge, NeoForge, Fabric, Quilt

The chart

Minecraft versionJavaClass fileExample pack
26.1 and newerJava 2569All the Mods 11 (26.1.2)
1.20.5 – 1.21.11Java 2165All the Mods 10 (1.21.1)
1.18 – 1.20.4Java 1761Vault Hunters 3rd Edition (1.18.2), All the Mods 9 (1.20.1)
1.17 – 1.17.1Java 1660—
1.16.5 and olderJava 852RLCraft (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 fileJavaMinecraft
52Java 81.16.5 and older
60Java 161.17 – 1.17.1
61Java 171.18 – 1.20.4
65Java 211.20.5 – 1.21.11
69Java 2526.1 and newer
70Java 26None so far
71Java 27None 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 buildsASMReads class files up to
47.2.0 to 47.2.209.5Java 21
47.2.219.6Java 22
47.2.23 to 47.3.119.7Java 23
47.3.12 to 47.4.89.7.1Java 24
47.4.9 to 47.4.169.8Java 25
47.4.17 to 47.4.269.9.1Java 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

  1. Install the Java you need. Eclipse Temurin is a free build of OpenJDK: download the JRE .msi for your version from adoptium.net. A JRE is enough to run a server; a JDK also works. The installer puts it in C:\Program Files\Eclipse Adoptium\ and can add it to your PATH.
  2. Open Command Prompt and run java -version. The first line names the version that java starts. where java lists every java.exe on the PATH, in the order Windows tries them.
  3. 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 with java @user_jvm_args.txt and replace that first java with 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)

  1. Install the Java you need. Adoptium’s apt repository has temurin-8-jre, temurin-17-jre, temurin-21-jre and temurin-25-jre; add the repository as shown on adoptium.net, then run sudo apt install temurin-21-jre (or the version you need).
  2. java -version shows the default. update-alternatives --list java lists every installed java, and sudo update-alternatives --config java changes the default.
  3. For a server that should always use one Java, put its full path in run.sh or your systemd unit instead of plain java, 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)

PackLoaderMinecraft
All the Mods 11NeoForge26.1.2
Better Adventures+ (26.2)Older versions: Java 21 (1.21.1–1.21.11)NeoForge / Fabric26.2
Sensible MCOlder versions: Java 21 (1.21–1.21.1)Fabric26.2
SkyBlock PlusOlder versions: Java 21 (1.21–1.21.11)Fabric26.2
Technical ElectricalOlder versions: Java 21 (1.21–1.21.8), Java 17 (1.18.2–1.20.4)NeoForge / Forge26.2
Vanilla PerfectedOlder versions: Java 21 (1.21–1.21.11), Java 17 (1.20.1)Fabric26.2

Java 21 (49 packs)

PackLoaderMinecraft
All of Create AeronauticsNeoForge1.21.1
All Simple Voice Chat ConnectionsFabric1.21.11
All the Mods 10NeoForge1.21.1
All the Mods 10 AeronauticsNeoForge1.21.1
All the Mods 10: To the SkyNeoForge1.21.1
All the MonsNeoForge1.21.1
Better Adventures++ (1.21.11)Older versions: Java 17 (1.19.2–1.20.1)Fabric / Quilt1.21.11
Better MC (BMC3)Fabric1.21.1
Better MC (BMC5)NeoForge1.21.1
Better Than Wolves Survival Rebirth (BTWSR)Fabric1.21.1
BlockFrontNeoForge1.21.1
Cobblemon Academy 2.0Fabric1.21.1
Cobblemon Brasil (Mobile)Fabric1.21.1
Cobblemon DeltaOlder versions: Java 17 (1.20.1)Fabric1.21.1
Cobblemon Expanded (by Jonathan)Older versions: Java 17 (1.20.1)Fabric1.21.1
Cobblemon IslandsOlder versions: Java 17 (1.20.1)Forge / Fabric1.21.1
Cobblemon Official Modpack (Fabric)Older versions: Java 17 (1.20.1)Fabric1.21.1
Cobblemon Official Modpack (NeoForge)Older versions: Java 17 (1.20.1)NeoForge / Forge1.21.1
Cobblemon Ori StarlightFabric1.21.1
Cobblemon x CreateNeoForge1.21.1
Cobblemon.ggOlder versions: Java 17 (1.20.1)Fabric1.21.1
CobbleverseFabric1.21.1
CraftoriaNeoForge1.21.1
Create UltimateOlder versions: Java 17 (1.20.1)NeoForge / Forge1.21.1
Create: OneBlockOlder versions: Java 17 (1.20.1)NeoForge / Fabric1.21.1
Create+Older versions: Java 17 (1.19.2)NeoForge / Forge1.21.1
Enigmatica 10NeoForge1.21.1
Fate's Machinery (FOM)NeoForge1.21.1
FTB Skies 2NeoForge1.21.1
FTB StoneBlock 4NeoForge1.21.1
Jornadas CobblemonOlder versions: Java 17 (1.20.1)Fabric1.21.1
Lost World: The Broken ScriptNeoForge1.21.1
Lucky Block ChallengeOlder versions: Java 8 (1.16.5)NeoForge / Forge1.21.1
One Block ModPackFabric1.21.10
Origins SMPOlder versions: Java 17 (1.20.1–1.20.2)Forge / Fabric1.21.11
Plants vs. ZombiesFabric1.21
Pokemania CobblemonFabric1.21.1
RealisticCraftOlder versions: Java 17 (1.19)Fabric1.21.11
Remade & Remastered: Snowflakes & Sleigh RidesFabric1.21.1
Shingeki no Craft Official ModpackOlder versions: Java 17 (1.20.2)Fabric1.21.11
Simple RealismFabric1.21.1
Slimes AdventureOlder versions: Java 17 (1.19.2), Java 8 (1.16.5)Forge / Fabric1.21.1
The Broken Script EnhancedNeoForge1.21.1
The FarmOlder versions: Java 17 (1.19.1–1.20)Fabric1.21.1
The Pixelmon ModpackOlder versions: Java 17 (1.20.1–1.20.2), Java 8 (1.16.5)NeoForge / Forge1.21.1
Tools for buildersFabric1.21.1
UndertaleFabric1.21
Unstable SMP SimulatorFabric1.21.11
UnstableSMP - Law FightFabric1.21.11

Java 17 (65 packs)

PackLoaderMinecraft
AgedFabric1.20.1
Alaskan WildernessForge1.20.1
All the Mods 9Forge1.20.1
All the Mods 9: To the SkyForge1.20.1
AnimateCraft: LankerenFabric1.20.1
ArdaCraftFabric1.20.1
BattleArmory TACZNeoForge / Forge1.20.1
Ben 10: OmnicraftForge1.20.1
Better MC (BMC2)Fabric1.20.1
Better MC (BMC4)Forge1.20.1
BigChadGuys PlusFabric1.20.1
Cave Horror Project 1Forge1.20.1
Cave Horror Project 2Forge1.19.2
Cisco's Fantasy Medieval RPG UltimateForge1.19.2
Conquest Reforged Modpack (Fabric)Fabric1.20.1
Craft to Exile 2Forge1.20.1
Create & Explore (C&E)Fabric1.20.1
Create Live 5Forge1.20.1
Create: Arcane EngineeringForge1.18.2
Create: AstralFabric1.18.2
Create: More Attachments and OptimizationForge1.20.1
Cursed WalkingForge1.20.1
DawnCraftForge1.18.2
DeceasedCraftForge1.20.1
Elysium DaysFabric1.20.1
Enigmatica 9Forge1.19.2
Fear NightfallForge1.20.1
Flooded CityForge1.20.1
FTB SkiesForge1.19.2
FTB StoneBlock 3Forge1.18.2
GregTech: New HorizonsGT New Horizons publishes two server zips, one for Java 8 and one for Java 17 to 25; use the Java 17 to 25 zip with Java 17, which GTNH's wiki calls the most widely tested.Forge1.7.10
GTA 5Forge1.20.1
Guns, Cars and MorphOlder versions: Java 8 (1.16.5)Forge1.20.1
Guns&FunForge1.20.1
HomesteadFabric1.20.1
HorizonsFabric1.20.1
Horror+ (Fabric)Fabric1.20.1
Horror+ (Forge)Forge1.20.1
Into the Backrooms: Found Footage HorrorFabric1.20.1
Isle of Berk (Claws of Berk)Forge1.18.2
Jujutsu Kaisen (Sorcery Fight)Forge1.20.1
Jurassic World RebirthOlder versions: Java 8 (1.12.2)Forge1.20.1
Kimetsu no Yaiba (Demon Slayer)Older versions: Java 8 (1.16.5)Forge1.20.1
Landscapes Reimagined GenesisFabric1.20.1
Medieval MC (MMC4)Forge1.20.1
MonifactoryForge1.20.1
One block horrorForge1.19.2
Pokemon ElysiumFabric1.20.1
Prehistoric WorldForge1.20.1
Prominence II: Hasturian EraFabric1.20.1
RaftPackFabric1.20.1
Rising LegendsFabric1.20.1
Shalz One Block Survival CreateFabric1.20.1
SkyFactory 5Forge1.20.1
Society: Sunlit ValleyForge1.20.1
SuperHeroesOlder versions: Java 8 (1.12.2)Forge1.20.1
The DwellersForge1.20.1
The Horrors in the FogForge1.20.1
The Minehattan ProjectOlder versions: Java 8 (1.5.2–1.6.4)Forge1.19.2
Timeless and Classics Zero Unofficial ModpackForge1.20.1
Vault Hunters 3rd EditionForge1.18.2
Wither Storm EnhancedNeoForge / Forge1.20.1
Zombie ApocalypseFabric1.20.1
Zombie Invade 100 DaysForge1.20.1
Zombie Storm 100 DaysForge1.20.1

Java 8 (11 packs)

PackLoaderMinecraft
AHZNB ModpackForge1.12.2
Create: Above and BeyondForge1.16.5
Mustard VirusForge1.12.2
Official FiskHeroes ServerForge1.7.10
Official HeroPack-Verse SuperHeroes ServerForge1.7.10
Parasites: ReloadedForge1.12.2
RLCraftForge1.12.2
SkyFactory 4Forge1.12.2
Supernova Empires 2Forge1.12.2
The Lost Era ModpackForge1.7.10
Winter ZombiesForge1.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.

Server still won’t start?Paste your log into the free crash log analyzer. It finds the Java error, or whatever else stopped the server, and explains the fix.

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.

Join the launch list