For Minecraft: Java Edition, choose Java for the exact Minecraft release and server software—not simply the newest Java on your computer. Vanilla 1.20.5–1.21.11 uses Java 21; the 26.1–26.3 releases use Java 25. Older versions have different requirements, and Paper or a modpack can change the practical choice.
Checked on 8 November 2026: Mojang’s official version manifest identifies 26.3 as the latest stable release. Snapshots are not included in that label. This guide concerns Java Edition clients and dedicated servers, not Bedrock Edition.
Minimum, launcher runtime and recommendation are different
A historical minimum tells you which Java generation an original Vanilla release required. A launcher runtime is the Java installation selected by a launcher today. A recommendation is the runtime a server project or pack maintainer advises for a particular build. These can legitimately be different numbers.
That distinction matters most for old Minecraft. Maintained Mojang metadata assigns Java 8 to several much older releases; that does not prove Java 8 was their original minimum. Likewise, Paper recommending Java 21 for a branch does not make Java 21 the original Vanilla requirement for every release in it.
Use the historical column to understand compatibility, not as an instruction to install an obsolete runtime. For an actual deployment, follow the documentation for your exact server, loader and plugins, and select a maintained Java distribution where that software supports it.
Minecraft and Java: the Vanilla compatibility table
The legacy rows describe release-era requirements; the newer rows show the required Java generation and the normal baseline to select. They are not a promise that every older game works with every newer JVM.
| Minecraft Java Edition | Historical minimum / required generation | Practical starting point |
|---|---|---|
| 1.4.x–1.5.2 | Java 5 | Use a dedicated legacy profile; Mojang’s maintained 1.4.7 and 1.5.2 metadata selects Java 8. Check the whole stack. |
| 1.6.1–1.11.2, including 1.7.10 and 1.8.x | Java 6 | Java 8 is a common legacy baseline and is selected in Mojang’s 1.8.9 metadata; forks and mods may require more. |
| 1.12–1.16.5 | Java 8 | Java 8 for Vanilla; check implementation-specific recommendations before changing it. |
| 1.17–1.17.1 | Java 16 | Match the launcher/runtime or exact server requirements; Paper’s recommendation differs below. |
| 1.18–1.20.4 | Java 17 | Java 17 for Vanilla; do not extend this row to 1.20.5. |
| 1.20.5–1.21.11 | Java 21 | Java 21; 1.20.5 also introduced a 64-bit operating-system requirement. |
| 26.1–26.3 | Java 25 | Java 25; 26.3 is the latest stable release verified for this guide. |
For the early boundary, the Minecraft Wiki records Java 5 for 1.4.7, Java 6 for 1.6.1 and Java 6 for 1.8. Inspection of representative official server JARs corroborates the bytecode generations, but is not a gameplay or full-runtime compatibility test.
For newer releases, the version-specific JSON files linked from Mojang’s manifest identify Java 8 for 1.12 and 1.16.5, Java 16 for 1.17, Java 17 for 1.18 and 1.20.4, Java 21 for 1.20.5 and 1.21.11, and Java 25 for 26.1 and 26.3. Mojang’s 1.20.5 release notes and 26.1 release notes explicitly announce the corresponding requirement changes.
Does Minecraft 1.4 need Java 7? Does 1.8 need Java 8?
Neither is an accurate statement of the original Vanilla minimum. For 1.4, Java 7 is not the historical floor: the 1.4.7 reference records Java 5. For 1.8, the original requirement is Java 6, not Java 8.
“Use Java 8 for a legacy 1.8 server” can nevertheless be sensible implementation-specific advice. Mojang’s maintained launcher metadata uses Java 8 for 1.8.9, while Paper recommends Java 8 for its 1.7.10–1.11 range. A plugin compiled for Java 8 can also raise the effective minimum even when the original game did not require it.
Do not turn those historical numbers into download instructions for Java 5, 6 or 7. They are obsolete generations. Java 8 is also a legacy baseline: security maintenance depends on the distribution and update stream, not just the number “8.” A newer JVM alone does not patch vulnerabilities in an old server or its libraries. Keep legacy instances separate and review their security fixes before exposing them publicly.
Paper has its own recommendations
Paper’s getting-started documentation currently gives this recommended, not universal Vanilla-minimum, table:
| Paper version | Recommended Java |
|---|---|
| 1.7.10–1.11 | 8 |
| 1.12–1.16.4 | 11 |
| 1.16.5 | 16 |
| 1.17–1.19 | 17 |
| 1.20–1.21.11 | 21 |
| 26.1+ | 25 |
Its current-release requirement is at least Java 25. Read that statement alongside the versioned table, not as an instruction to move every archived Paper build to Java 25. Also, a recommended runtime does not mean an old branch still receives fixes. Other forks and individual plugins have their own support policies.
Modpacks, Forge, NeoForge and Fabric: check separately
For a modded server, start with the exact pack release, then its loader version and installation instructions. The Vanilla table is background information, not an override for the pack’s requirements. Older loaders can depend on behavior that changed in later Java releases; newer mods may require a higher bytecode level than their host game.
Use the project’s own documentation, such as Fabric’s Java installation guide and NeoForge’s user guide, checking the selected Minecraft/documentation version. Do not extrapolate a page’s “latest” row across a new Minecraft generation. Record the pack, loader, Java distribution and major version together so another administrator can reproduce the setup.
Check the Java that actually starts the server
Before installing anything, identify the Minecraft patch version, whether the server is Vanilla, Paper or modded, and the startup command. Then run:
java -version
This reports the executable reached by that terminal. It does not prove a hosting panel, container, service or launcher uses the same executable. Check its runtime/image selector and startup log. If its command points to an explicit Java path, check that executable instead. On a client, inspect the launcher’s installation profile before changing your computer’s global Java.
For example, Vanilla 1.20.4 belongs to the Java 17 row, but Vanilla 1.20.5 belongs to Java 21. Paper 1.20.4 belongs to Paper’s Java 21 recommendation. Those are three distinct decisions despite the similar Minecraft numbers. Select the runtime for the process you are troubleshooting, not for a different installation that happens to work.
Fix startup errors without guessing
UnsupportedClassVersionError usually means the selected JVM cannot read a class compiled for a newer Java generation. The error might name the server, a loader or just one plugin. In the JVM class-file specification, class major versions 52, 61, 65 and 69 correspond to Java 8, 17, 21 and 25. These are bytecode numbers, not Minecraft versions.
If a plugin needs Java 21 but your old server supports only an older runtime, simply upgrading Java may break something else. Find a compatible plugin build, update the whole supported stack, or reconsider that plugin. Conversely, older JVM flags can become invalid on newer Java; retain only flags documented for the selected runtime.
A missing java command points first to installation or executable-path selection. A memory allocation failure or port conflict is not proof of the wrong Java major version. Read the first relevant error and the lines immediately above it before changing unrelated settings.
A safe change checklist
- Back up the world, configuration, plugins/mods and current startup settings before changing the environment.
- Confirm the exact release and implementation, then choose its documented Java version. Use a reputable distribution source or your host’s supported runtime selector—not a random “Java fix” download.
- Change only the selected Java runtime first. Keep the previous setting recorded; do not combine this with a world-version upgrade.
- Restart cleanly and inspect the startup log. On a copy where practical, check joining, loading the world and the plugins or mods you actually use.
- If it fails, restore the previous runtime/settings. If another change upgraded world data, restore the matching backup rather than assuming a downgraded server can read it safely.
For a hosted setup, compare SharpHeberg’s Minecraft hosting with your exact server or modpack needs and confirm runtime availability before ordering. The right starting point is a matched Minecraft, server and Java combination—not a universal “install the newest Java” rule.