1. Home
  2. Hosting guides
  3. Minecraft server Java version

What Java version does a Minecraft server need?

A Minecraft server needs Java 25 for version 26.1 and newer, Java 21 for 1.20.5 to 1.21.11, Java 17 for 1.18 to 1.20.4 and Java 16 for 1.17. Here is the full table, what the class file version error means, how to install or switch Java, and which start flags to use.

Prices checked on 10 October 2026 on the hosts' own order pages. All prices include VAT.

A Minecraft server with a RAM stick, a grass block and a map

The short answer

Minecraft 26.1, 26.2 and 26.3 need Java 25, and 1.20.5 to 1.21.11 need Java 21. An older Java than that never starts the server and shows a class file version error: 69.0 asks for Java 25, 65.0 for Java 21. On a hosted server you change Java in the panel, and some panels pick it for you from the Minecraft version.

Compare modded Minecraft server hosting

Compare the modded Minecraft server hosting plans below if you run Forge, NeoForge or Fabric, where the Java version matters most because each loader needs the Java of its Minecraft version. By our rule, ten players on a modded server need about 10 GB of RAM. Each row is the best plan at that host for 6 to 10 players on a modded Java server with up to 100 mods in Poland (Warsaw), with the finder's pick first.

The best Minecraft server plan at each host for 6 to 10 players on Java in Poland (Warsaw)
ProviderMemoryCPU & storageMonthly priceOrder page
Lodehost Standard, performance line12 GB Free websiteRyzen 9 7950X with DDR5, Poland (Warsaw) 3 reserved vCPU, 80 GB Enterprise NVMe€9.58 /mo First 3 months, then €23.95/mo, €20.95 on 24 months 60% off for new customersView plan Lodehost Standard (opens Lodehost)
Astroworld Hosting Standard Performance12 GB Free websiteRyzen 9 7950X with DDR5, Poland (Warsaw) 3 reserved vCPU, 60 GB Enterprise NVMe€9.58 /mo First 3 months, then €23.95/mo, €20.95 on 24 months 60% off for new customersView plan Astroworld Standard Performance (opens Astroworld Hosting)
Cheapest Minecraft Hosting Builder, budget line12 GBRyzen 9 7950X with DDR5, Poland (Warsaw) 2 shared vCPU, 60 GB NVMe€9.60 /mo Same price on every termView plan CheapestMinecraftHosting Builder (opens Cheapest Minecraft Hosting)

On the Performance lines the large price is what a new customer pays a month at the start: for the first 3 months at both Astroworld Hosting and Lodehost, when you pay monthly. The regular monthly price comes after it, and the last price in each row is the monthly price on the host's longest term.

Compare the same billing term and location before you order.

Every price is taken from the host's own order page. How we compare

Which Java does your Minecraft server need?

Most Minecraft servers today need one of 3 Java versions, and the Minecraft version decides which:

  • Java 25

    Minecraft 26.1 and newer: 26.1, 26.2 and 26.3, the versions with the new year-based numbers.

  • Java 21

    Minecraft 1.20.5 to 1.21.11, the last versions before the numbering changed.

  • Java 17

    Minecraft 1.18 to 1.20.4, including 1.20.1, which many Forge modpacks still use.

A Java older than the table says never starts the server. A newer one usually does, which is why some hosts run 1.20.5 and up on Java 25.

Minecraft server Java version for every Minecraft version

The Minecraft server Java version follows the game version: 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.12 to 1.16.5. Paper recommends a newer Java than that minimum on some older versions:

The Java version each Minecraft server version needs, and the Java that Paper recommends
Minecraft versionJava it needs at leastJava Paper recommends
26.1 to 26.3Java 25Java 25
1.20.5 to 1.21.11Java 21Java 21
1.20 to 1.20.4Java 17Java 21
1.18 to 1.19.4Java 17Java 17
1.17 and 1.17.1Java 16Java 17
1.16.5Java 8Java 16
1.12 to 1.16.4Java 8Java 11

Fabric, Forge and NeoForge run inside the same Java as the game, so a modded server needs at least the Java of its Minecraft version: a Forge modpack on 1.20.1 needs Java 17, and a NeoForge pack on 1.21.1 needs Java 21.

Java version for Minecraft 26.1, 26.2 and 26.3

Minecraft 26.1, 26.2 and 26.3 need Java 25. Version 26.1, released on 24 March 2026, was the first to require it, and the game itself now ships with the Microsoft build of OpenJDK 25. It was also the first release with the new year.drop.hotfix numbers, which is why there is no Minecraft 1.22: the version after 1.21.11 is 26.1.

So moving a server from 1.21.11 to 26.1 or newer always means a Java upgrade from 21 to 25 as well. Paper's own getting started page says the same: current Paper needs at least Java 25.

How to fix class file version 69.0 and 65.0 errors

To fix a class file version 69.0 error, run the server on Java 25, and for class file version 65.0, Java 21 is enough: the error means that the server jar or a plugin was built for a newer Java than the one that starts it. The full message looks like this:

java.lang.UnsupportedClassVersionError: ... 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

The first number is the Java the file needs, the second the Java you have. In this example a 26.x server, or a plugin built for it, meets Java 21. These are the numbers you will see:

  • 69.0 is Java 25, needed for Minecraft 26.1 and newer.
  • 65.0 is Java 21, needed for 1.20.5 to 1.21.11.
  • 61.0 is Java 17, needed for 1.18 to 1.20.4.
  • 60.0 is Java 16, and 52.0 is Java 8.

If the message names a plugin or mod instead of the server jar, the server runs on the right Java for its version, but that plugin was built for a newer one. Download the build of the plugin that matches your Minecraft version.

How to check the Java version of a Minecraft server

To check the Java version of a Minecraft server at home, type java -version in a terminal or command prompt: the first line shows the version, for example 25 or 21. On a computer with more than one Java installed, the start script may use a different one than that command, so check the path to java in the script as well. On a hosted server, the panel shows or sets the Java version.

How to change the Java version for a Minecraft server

To change the Java version for a Minecraft server at home, install the Java your Minecraft version needs and start the server with it, in 3 steps:

  1. Install the right Java. Paper's guide to installing Java uses Amazon Corretto: the installer on Windows, brew install openjdk@25 on a Mac, and Amazon's package repository on Ubuntu and Debian.
  2. Point the start script at it. Replace java in the start command with the full path to the new Java's java file if an older Java is still installed.
  3. Start the server and check the console: the class file version error is gone once the versions match.

On a hosted server, the Java version is a setting in the panel. On panels based on Pterodactyl, it is the Docker Image list on the Startup tab, according to Paper's Java guide. At Astroworld Hosting there is nothing to pick: the panel chooses the Java runtime from the Minecraft version you set on the Settings tab, and runs 1.20.5 and newer on Java 25.

Can an older Minecraft server run on Java 25?

An older Minecraft server from 1.20.5 up runs on Java 25: Astroworld Hosting runs those versions on Java 25 for every customer and calls a newer runtime almost never a problem, while an older one always is. For versions before 1.20.5, follow the Java that Paper recommends in the table, and for a modpack, use the Java its own page asks for.

Best Java version for a Minecraft server

The best Java version for a Minecraft server is the one in the table for your Minecraft version, as a 64-bit OpenJDK build: the Microsoft build of OpenJDK that Minecraft itself ships, or Amazon Corretto, which Paper's docs use. Both are free. You do not need an Oracle license to run a Minecraft server, and a JDK works as well as a JRE for running one.

Java arguments for a Minecraft server

The Java arguments most Minecraft servers start with are Aikar's flags, which Paper's docs recommend: the same value for -Xms and -Xmx, for example 6500M on a machine with 8 GB, plus a set of settings for the G1 garbage collector. The start of the command looks like this:

java -Xms6500M -Xmx6500M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 ... -jar server.jar --nogui

Leave 1 to 1.5 GB of the machine's memory outside -Xmx, because Java and the system need room on top of it. Paper's page on Aikar's flags has the full line and a start script generator. On a hosted server the panel sets the memory from your plan, so you rarely need to touch these.

Before you switch Java on a Minecraft server

Before you switch Java on a Minecraft server, check 3 things, so the server starts on the first try:

  1. Check the Minecraft version

    The game version decides the Java version, so look it up before you install anything.

  2. Use a 64-bit Java

    Minecraft 1.20.5 and newer need a 64-bit system, so install the 64-bit build of Java.

  3. Move plugins and mods along

    A plugin built for Java 25 does not load on Java 21, so update the server, its plugins and Java together.

Questions about Java for Minecraft servers

What Java version do I need for Minecraft 1.21?

Java 21. Every version from 1.20.5 to 1.21.11 needs at least Java 21, including the popular modded version 1.21.1. From 26.1 on, you need Java 25.

What Java version for a Minecraft 1.20.1 server?

At least Java 17, which every version from 1.18 to 1.20.4 needs. Paper recommends Java 21 for its 1.20 builds, and a Forge modpack on 1.20.1 runs on Java 17.

Do players need the same Java version as the server?

No. The Minecraft launcher brings its own Java for the game, so players never install Java themselves. Only the server, or the computer that runs it, needs the right version.

Does a Bedrock server need Java?

No. Bedrock Dedicated Server is its own program and runs without Java. A crossplay server is different: it is a Java server with Geyser, so it needs the Java of its Minecraft version.

What does class file version 69.0 mean?

It means the file was built for Java 25, while the server runs on an older Java. Install Java 25, or pick it in your host's panel, and start the server again.

Is Java 25 free to use for a Minecraft server?

Yes. OpenJDK builds such as the Microsoft build of OpenJDK and Amazon Corretto are free, also for a public or paid server.

Still unsure? Use the Minecraft server finder