Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →The Java version a Minecraft server needs depends on the server release, not on the age of your computer. Use Java 17 for Minecraft 1.18 through 1.20.4, Java 21 for 1.20.5 and newer releases in the documented mapping, and the exact runtime required by the server project for later builds. For a 1.21-family server, Java 21 is the practical baseline; a reported Spigot 26.1 requirement of Java 25 or later shows why you should verify each build’s documentation instead of assuming one Java version works forever.
Prefer not to run the server on your own PC? Godlike.Host offers hosted Minecraft Java servers with free DDoS protection and up to three free backups a day.
Java requirements by Minecraft server version
The minimum Java version is a compatibility floor. It tells you the oldest runtime that can launch that server line; it does not promise that every newer Java release, mod loader, or plugin combination has been tested with it.
As an Amazon Associate I earn from qualifying purchases.
| Minecraft server release | Minimum Java version | What to use in practice |
|---|---|---|
| 1.12 through 1.16.5 | Java 8 or newer | Use the Java version documented by the specific server software and mod stack. |
| 1.17 through 1.17.1 | Java 16 or newer | Keep the runtime aligned with the server project’s supported builds. |
| 1.18 through 1.20.4 | Java 17 or newer | Java 17 is the normal baseline for this range. |
| 1.20.5 and newer in the documented mapping | Java 21 or newer | Java 21 is the normal choice for 1.20.5 through the 1.21 family unless the project specifies another version. |
| Minecraft 1.20.6 on Paper | Java 21 | Paper’s compatibility guidance identifies Java 21 for this release. |
| Spigot 26.1 | Java 25 or later, according to Spigot’s current site result | Confirm the exact build and its release notes before upgrading a production server. |
Therefore, Minecraft 1.20.1 does need Java 17 or newer. A 1.21 server generally needs Java 21. If a future server line raises its baseline, its own release notes take precedence over this table.
What Mojang requires before the server can start
Mojang’s official Java Edition server documentation states: “For Java Edition: You must have a compatible Java Runtime Environment (JRE) installed to launch the server .jar file.” The runtime must also be available from the command line. On Windows, that commonly means adding the Java installation to PATH or otherwise configuring the launch command so the operating system can find java.exe.
#1 Best Overall
The server software itself is free to download. That does not automatically make a server reachable from the internet: players outside your home network may also need router port-forwarding and an allowed firewall rule. Those networking tasks are separate from choosing the Java runtime, but a correctly installed Java version cannot compensate for a blocked port.
Identify the exact server version first
Do not install Java based only on a broad label such as “modern Minecraft.” Find the precise release and server implementation you intend to run. The version may appear in the JAR filename, a launcher profile, a hosting control panel, or the download page for the server software.
- JAR filename: Read the Minecraft release number in names such as a versioned server JAR. Do not assume that a renamed file still contains the version you expect.
- Launcher profile: Check the selected installation or profile rather than the version of the Minecraft client you last played.
- Hosting panel: Open the server’s software and version selector. Managed hosts may hide the Java process, but the selected Minecraft build still determines compatibility.
- Implementation documentation: For Paper, Spigot, or another fork, check the build documentation for that exact Minecraft release after identifying the underlying version.
This check prevents a common mistake: installing Java 17 because it worked for an older world, then attempting to launch a 1.20.6 or 1.21 server that requires Java 21.
Vanilla, Paper, and Spigot do not have one universal rule
Vanilla follows the Java baseline associated with the Minecraft release. Alternative server implementations are version-specific projects, so their build documentation remains authoritative even when they target the same game version.
| Server type | How to determine Java compatibility | Important qualification |
|---|---|---|
| Vanilla | Use the minimum associated with the Minecraft release. | The official server page still requires a compatible JRE available to the command line. |
| Paper | Use Paper’s guidance for the exact build. | Paper specifically identifies Java 21 for Minecraft 1.20.6. |
| Spigot | Use the Java version compatible with the Minecraft version and the Spigot build. | Spigot’s current site reports Java 25 or later for 26.1; verify the exact build before deployment. |
That means you can often run vanilla, Paper, and Spigot for the same Minecraft release with the same Java major version, but “often” is not a guarantee for every build, plugin, or fork. The implementation’s release notes win when they specify a different requirement.
JRE or JDK: which Java package should you install?
Launching a server JAR requires a Java runtime. A JRE supplies the components needed to run Java applications, while a JDK also includes development tools. If you only operate a server, a compatible JRE is sufficient in principle. A JDK is useful when you compile plugins, build server software, or need development utilities.
Free tools Windows power users keep installed
One-click scans. No signup required.
| Your task | Package that meets the need | Why |
|---|---|---|
| Run a downloaded vanilla, Paper, or Spigot server JAR | Compatible JRE or JDK | The server needs a Java runtime; a JDK also contains one. |
| Develop or compile plugins | Compatible JDK | Compilation tools are not part of a minimal runtime. |
| Build or modify server software | JDK matching the project’s build instructions | Build systems may require development tools and a particular Java release. |
Whatever package you choose, use a supported distribution and the major version required by the project. The name of the package matters less than whether the runtime is the right version and is the same executable used to start the server.
Install and verify Java step by step
Use these steps on the machine or account that actually launches the server. Checking Java in a desktop terminal while a service runs under another account can produce a misleading result.
- Record the Minecraft and implementation versions. Write down the exact release, such as 1.20.1, 1.20.6, or a 1.21 build, plus whether the JAR is vanilla, Paper, Spigot, or another fork.
- Choose a runtime that meets the minimum. Select Java 17 for the 1.18–1.20.4 range, Java 21 for 1.20.5 and later in the documented mapping, or the newer version explicitly required by the implementation. For a reported Spigot 26.1 build, that means Java 25 or later.
- Install the JRE or JDK. On a self-hosted machine, install it for the operating system account that will run the server. On a managed host, select the corresponding Java option in the panel if the provider exposes one.
- Open a terminal in the server’s execution environment. This may be a normal shell, a service account, a container, or a hosting console. The location matters because PATH settings can differ between users and services.
- Check the runtime. Run
java -version. Confirm that the reported major version matches the server requirement. A Java 21 runtime should identify itself as version 21; do not rely on the filename of an installer. - Start the server with that same executable. Use the server’s normal launch command, for example
java -jar server.jarwith any memory or agreement options required by the software. If several Java installations exist, call the intended executable by its full path rather than leaving selection to PATH. - Read the startup log. A successful launch should proceed into the server’s normal initialization messages. Stop if the log reports an unsupported class version, a missing runtime, or a plugin incompatibility.
Keep a backup of the world, configuration, and plugin data before changing the server JAR or Java major version. A Java change is normally reversible; a world or configuration migration may not be.
Fixing “UnsupportedClassVersionError”
This error means the Java process is too old for at least one class in the server JAR or an installed component. The message usually includes two class-file numbers: the class was compiled by a newer Java version, while the current runtime only understands an older one.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When the server JAR itself is too new
Compare the runtime from java -version with the release map. For example, starting a 1.20.6 server with Java 17 leaves the runtime below Paper’s documented Java 21 requirement. Install or select Java 21, then launch the server with that executable.
When a plugin or mod is the only incompatible component
If the server starts far enough to identify a particular plugin or mod, the base runtime may be correct while that component was compiled for a newer Java release. Update the component to a build compatible with your server, replace it with a compatible release, or remove it temporarily to confirm the diagnosis. Do not lower Java simply to satisfy one outdated plugin if the Minecraft server itself requires a newer major version.
When the right Java is installed but not being used
A frequent cause is a PATH or service-account mismatch. Run java -version from the same script, terminal, container, or service definition that starts the server. If it reports the wrong major version, change the launch command to the full path of the intended Java executable and restart the service.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Can a newer Java release run an older Minecraft server?
Sometimes, but the minimum table should not be read as a blanket compatibility promise. “Java 17 or newer” establishes the lower bound for the 1.18–1.20.4 line; it does not prove that every later Java release has been tested with every old mod loader, plugin, or launcher. Older software may depend on behavior that changed between Java releases.
For a stable production server, prefer the Java major version the server project tests and supports. If you must try a newer runtime, copy the entire server directory or create a separate test instance first. Start without exposing the test instance to players, check the startup log, load a backup world, and exercise critical plugins before switching the live server.
Changing Java while upgrading a server
Java and Minecraft upgrades are related but separate changes. A 1.20.4 server can run on Java 17 under the documented mapping; moving it to 1.20.5 or later changes the normal baseline to Java 21. Treat the Java change and the server-JAR change as two recorded steps so that you can identify which change caused a failure.
- Back up the world, server properties, whitelist, operator list, scripts, and plugin or mod directories.
- Record the current Java path and the output of
java -version. - Install the required new runtime without deleting the old one.
- Test the new JAR and Java executable against a copy of the server.
- Review plugin and mod compatibility before opening the upgraded instance to players.
- Keep the old JAR, old Java path, and backup available for rollback until the new instance has operated normally.
Security can also justify upgrading the server release itself. Mojang’s 1.21.1 notice recommends that server owners move to that release to address critical exploits and says players on 1.21 can join 1.21.1 servers. Apply that kind of security guidance with the same backup and compatibility discipline as any other upgrade.
Recommended Free Tools
Self-hosting versus managed hosting
On a local or rented machine, you are responsible for installing Java, setting PATH, selecting the executable, opening the firewall, and forwarding the server port when outside players need access. This gives you control over the Java version and launch flags, but it also makes account and service configuration your responsibility.
A managed host may provide a Java selector and handle the operating-system installation. That can remove PATH and service-account work, but you still need to choose a runtime compatible with the selected Minecraft and server implementation. Ask the host which Java major versions are available before changing a server version, and confirm whether the panel launches the same version you selected.
Quick Recap
Practical decision checklist
- Identify the exact Minecraft release and server implementation.
- Use Java 8+ for 1.12–1.16.5, Java 16+ for 1.17–1.17.1, Java 17+ for 1.18–1.20.4, and Java 21+ for 1.20.5 and newer in the documented mapping.
- For Paper 1.20.6, use Java 21.
- For a reported Spigot 26.1 build, verify the build requirement of Java 25 or later before launch.
- Run
java -versionin the same environment that starts the server. - Use a JDK only when you need development or compilation tools; a compatible JRE is enough to launch.
- Back up before changing Java, the server JAR, worlds, plugins, or mods.
- Resolve PATH, service-account, and firewall issues separately from Java compatibility.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




