Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

Minecraft Server Won’t Start? How to Fix Java Version Problems

A Minecraft server usually will not start when its JAR needs a newer Java major version than the runtime launching it. Learn how to identify the exact requirement, correct PATH and startup scripts, and separate Java errors from plugin, mod, port and world-version problems.
Length9 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Most Minecraft server startup failures that mention Java have one cause: the server JAR was compiled for a newer Java major version than the runtime actually launching it. Install the required major version, make the launch context use that executable, and start the JAR from a script so the real error remains visible.

The correct version depends on both Minecraft and the server software. Vanilla Minecraft 1.18 introduced Java 17; current Paper documentation requires Java 17 for Paper 1.17–1.19, Java 21 for Paper 1.20–1.21.11, and Java 25 for Paper 26.1 and newer. Fabric requires Java 17 for Minecraft 1.17–1.20.4 and Java 21 for 1.20.5 and newer.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Identify the exact server and its Java requirement

Do not choose Java from the Minecraft version alone. First record the Minecraft release, the server JAR or loader, and whether a panel, service, script, or launcher starts it. The same computer can have several Java installations, and a control panel or startup script may select a different executable from the one used in an interactive terminal.

Vanilla Java Edition

Mojang’s server guidance says Java Edition needs a compatible Java installation. Minecraft 1.18 release notes state that Minecraft now uses Java 17. That makes Java 17 the baseline for a 1.18-era server, but later releases and third-party server software can require a newer major version. Always check the requirement for the exact server build you downloaded.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Paper

Paper’s current compatibility table lists these requirements:

Paper release Required Java major version
1.17–1.19 Java 17
1.20–1.21.11 Java 21
26.1 and newer Java 25

A Paper JAR built for Java 21 will not start under Java 17, even if Java 17 is installed correctly for an older server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fabric

Fabric’s installation documentation requires Java 17 for Minecraft 1.17 through 1.20.4 and Java 21 for Minecraft 1.20.5 and newer. Fabric’s server launcher JAR and the installed mods must also match the Minecraft release; changing Java cannot repair a loader or mod built for a different game version.

Use the same launch context to see which Java is really running

The most important diagnostic is java -version executed where the server is launched. Running it in a separate terminal can be misleading: a hosting panel, Windows shortcut, scheduled task, Docker container, or shell script may have its own PATH and Java selection.

  1. Stop every server instance. Close the panel task or terminal and check that no old Java process is still running.
  2. Open the launch context. Use the same terminal, panel console, service definition, container shell, or script that normally starts the server.
  3. Print the runtime version. Run java -version. The first line contains the major version, such as 17, 21, or 25.
  4. Find the executable selected by PATH. On Windows run where java; on Linux or macOS run which java. If multiple paths appear, the first one is normally selected.
  5. Compare the result with the server requirement. A Paper 1.20 server showing Java 17 is mismatched; a Fabric 1.20.4 server showing Java 21 is not automatically wrong, but its loader and mods still need to support that setup.
  6. Repeat after every change. Close and reopen the terminal or restart the panel service before running java -version again, because an existing process keeps its old environment.

Reading UnsupportedClassVersionError

An error such as java.lang.UnsupportedClassVersionError means the runtime is too old for the compiled class files. Paper’s troubleshooting example shows class-file version 65 being run by a runtime that supports only through version 61. Version 65 corresponds to Java 21, while version 61 corresponds to Java 17. The solution is to run the server with Java 21 or newer as required by that build, not to reinstall the same Java 17 runtime.

Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

If the message says the class file is newer than the maximum version your runtime supports, read the two numbers as a direct comparison: the class-file target is the minimum major version needed, and the runtime’s maximum is what you currently have. If the message is different, continue to the first exception in the log rather than assuming Java is responsible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install the required Java and make the server use it

Windows: correct PATH or call java.exe directly

Installing Java does not guarantee that java resolves to the new installation. Windows may retain an older Java directory earlier in PATH, and a panel may store its own executable path.

  1. Install a Java runtime matching the server’s required major version.
  2. Open a new Command Prompt or PowerShell window. Existing windows keep the old PATH.
  3. Run java -version and where java.
  4. If the first path is the old installation, edit the system or user PATH so the intended Java bin directory appears first, or remove obsolete entries that you no longer need.
  5. Open another new terminal and verify the result again.
  6. If a panel or script still selects the wrong runtime, bypass PATH by calling the full executable path in the startup command.

A full-path command has the form "C:PathToJavabinjava.exe" -Xms4G -Xmx4G -jar paper.jar --nogui. Replace the path with the location shown by your installation and keep quotation marks around paths containing spaces. This makes the selected Java explicit even when PATH is shared by other applications.

Linux and macOS: verify the shell or service environment

Install the required Java major version using the distribution or vendor method appropriate for your operating system, then open a fresh shell and run java -version. If several versions are installed, select the intended one with the operating system’s Java alternatives mechanism or use an absolute path in the service or script. A system service may not read the same shell profile as your login account, so test from the service definition or container that actually launches the server.

Keep the server directory, Java path, memory options, and JAR name in one startup script. This avoids relying on whichever Java happens to be first in an administrator’s interactive PATH.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Minecraft | 1720 Minecoins Pack | Digital Code
  • Minecoins let you buy Minecraft content you can enjoy on your Android, iOS, Windows 10, Xbox One and Nintendo Switch devices*
  • Visit the in-game Minecraft marketplace, where you'll discover a constantly updating library of exciting new Minecraft content - from a community whose imagination knows no limits.
  • Once you've redeemed your Minecoins, they'll be linked with your Xbox Live account, so you can access your coins and purchases through all of your supported devices that run Minecraft.
  • Minecoins are a perfect gift for Minecraft players!

Start the JAR from a script, not by double-clicking

Double-clicking a JAR often closes the window immediately when startup fails, hiding the exception. A script leaves the console available and makes the exact command repeatable. Run it from the directory containing the server JAR, or provide an absolute JAR path.

Paper command

Paper documents this basic command:

java -Xms4G -Xmx4G -jar paper.jar --nogui

-Xms4G sets the initial heap and -Xmx4G sets the maximum heap. Change the values to suit the machine and workload; memory settings do not fix a Java-major-version mismatch. If your downloaded file has another name, use that exact name or rename it consistently.

Fabric command

Fabric documents this form:

java -Xmx2G -jar <fabric server launcher jar file name> nogui

Replace the angle-bracketed text with the actual launcher filename. The command must be run with the Java major version required by the Minecraft release and Fabric loader.

Vanilla command

For a vanilla server, use the exact server JAR filename supplied for the release, for example:

java -Xms2G -Xmx4G -jar server.jar --nogui

Do not assume that a generic filename means you downloaded the right release. Confirm the file and Minecraft version before diagnosing Java.

Rank #4
Sale
Minecraft Dungeons: Standard Edition – Windows 10 [Digital Code]
  • Fight your way through an all-new action-adventure game, inspired by classic dungeon crawlers and set in the Minecraft universe!
  • Play with up to four friends or brave the dungeons alone. Battle new-and-nasty mobs across action-packed, wildly varied levels, in a quest to defeat the evil Arch-Illager!

Keep a failed Windows window open

Add pause on a new line at the end of a Windows batch file. The window then waits after an error, allowing you to copy the first exception instead of losing it when the process exits.

Separate Java errors from other startup failures

Once the runtime version is correct, inspect the server’s own evidence. Paper recommends checking latest.log, crash reports, and the first exception in the stack trace. The final line is often only a consequence; the first exception usually identifies the component that failed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plugin or mod failure

If a plugin name appears in the first exception, stop the server and temporarily remove or disable that plugin. If the server starts, restore plugins in small groups or use a binary-search approach to identify the incompatible one. For Fabric, perform the same isolation with mods and verify that each mod targets the exact Minecraft and loader versions. Do not delete a world to test a plugin or mod; make a backup first.

Port binding failure

A message that the server cannot bind to its port usually means another Java process is already using that port, or the configured server-ip is incorrect. This is not a Java-version mismatch. Stop the old server process, choose an unused port, or correct the bind address. Leave server-ip blank unless you specifically need to bind to one local interface.

World saved by a newer version

A “world saved with newer version” error means the world was opened by a newer server than the one you are starting. Downgrading is unsupported and can corrupt data. Restore a backup made before the upgrade, or run the world on a compatible newer server. Do not force a downgrade with an override designed to suppress the warning.

Best Value
Coding for Kids: Learn to Code Minecraft Mods in Java - Video Game Design Coding - Computer Programming Courses, Ages 11-18, (PC, Mac Compatible)
  • ✓ MODDING and CODING for all kids, not JUST GAMERS: Create Minecraft Games by coding your own custom blocks, tools, armor, weapons, and much more! Gaming is a popular topic among youth and many consider themselves gamers. We use computer games as a fun medium to help students understand computer logic.
  • ✓ LIVE MENTOR SUPPORT: Chat directly with a real human mentor for help designing and coding games using our Minecraft Mod Java game design tutorials. Unlike other online coding programs for kids that offer you a how-to sheet and let you learn from there, we offer live chat assistance.
  • ✓ SCHOOL and HOMESCHOOL APPROVED CURRICULUM and STEM CERTIFIED: Simply Coding courses have been approved by school systems throughout the world, both as an elective and as an after school program. Including receiving high school credit for course completion.
  • ✓ DESIGNED BY PROFESSIONAL PROGRAMMERS with LIFETIME UPDATES to the latest Minecraft forge versions. The feedback of thousands of teens helps us test, refine, and perfect our system. This is the perfect gift for boys or girls ages 11 and up.
  • ✓ COMPATIBLE WITH PC or MAC: For this course, you need either Windows 10 computer or an Apple Computer version 10.13 or higher. Then simply access our online class via the provided pin code, create an account, and start learning from our step by step tutorials.

Missing or invalid files

A Java installation cannot repair a missing JAR, a corrupt download, a wrong filename, or a directory permission problem. Confirm that the command points to the intended file, that the account running the service can read the directory, and that the server has completed its first-run setup. Keep separate folders for different Minecraft versions so an older script cannot accidentally launch a newer or renamed JAR.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Vanilla, Paper, and Fabric: what changes besides Java?

Choosing server software affects compatibility work as much as choosing a runtime.

Software Java guidance Extensions Startup and maintenance considerations
Vanilla Use the Java major version required by the Minecraft release; Minecraft 1.18 introduced Java 17. Official server behavior; no Paper plugin API or Fabric mod loader. Use the release’s exact server JAR, accept the EULA during first setup, and maintain your own scripts, memory settings, backups, firewall rules, and port forwarding.
Paper Java 17 for 1.17–1.19; Java 21 for 1.20–1.21.11; Java 25 for 26.1+. Supports Paper-compatible plugins. Plugin compatibility and Java requirements can change between releases. Keep a plugin inventory, test updates on a copy, and read the first exception when startup fails.
Fabric Java 17 for 1.17–1.20.4; Java 21 for 1.20.5+. Uses Fabric mods rather than Paper plugins. The launcher JAR, loader, API, mods, and Minecraft version must align. Keep the exact launcher filename in the script and update the whole set deliberately.

These choices are not interchangeable. A Paper plugin cannot be made compatible with Fabric by changing Java, and a Fabric mod cannot be loaded by a vanilla server. Java solves runtime compatibility; it does not convert one server ecosystem into another.

A repeatable recovery checklist

  • Write down the Minecraft version, server software, loader version, and exact JAR filename.
  • Back up the world, configuration, plugins or mods, and server properties before changing versions.
  • Run java -version in the same context that launches the server.
  • Use where java on Windows or which java on Linux and macOS to detect PATH conflicts.
  • Install the required Java major version and restart the terminal, panel, or service.
  • Use an absolute Java path if PATH still selects the wrong executable.
  • Start from a script with the exact JAR name and keep the console visible.
  • If the error persists, read the first exception in latest.log or the crash report.
  • Isolate a named plugin or mod, then restore components one at a time.
  • For port errors, check running processes and network settings instead of reinstalling Java.
  • For newer-world errors, use a compatible newer server or a pre-upgrade backup; do not force a downgrade.

When managed hosting is the practical alternative

Running a server locally requires maintaining Java versions, startup scripts, memory limits, backups, firewall rules, and port forwarding. Managed Minecraft server hosting can handle some of that administration, but support is not universal. Before subscribing, confirm that the provider supports the exact Minecraft release, server software, Java major version, plugins or mods, backup schedule, and console access you need. You still need a backup and a way to identify the first exception when an extension is incompatible.

Final diagnosis

If the log contains UnsupportedClassVersionError, compare the class-file target with the runtime shown by java -version, then launch the server with the required Java executable. If the runtime is already compatible, stop treating the problem as a Java issue: use the first exception in the log to investigate plugins, mods, ports, files, permissions, or a world created by a newer server. Keeping a version-specific startup script and backup turns future Java upgrades into a controlled change rather than a guessing exercise.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.