Guides
Planning4 min readUpdated 2026-05-27

Java and Memory for Minecraft Servers

Choose a Java version and memory range before launching a Minecraft Java server.

Many startup problems come from two basics: the wrong Java version or unrealistic memory settings. Check both before you start debugging plugins or network settings.

Java versions

Use the newest Java version supported by your Minecraft version. If your host panel lets you choose Java, set it explicitly instead of relying on the default.

Different Minecraft versions require different Java versions:

Minecraft versionJava version
1.26.1+Java 25
1.20.5 to 1.21.11Java 21
1.18 to 1.20.4Java 17
1.17 to 1.17.1Java 16
1.12 to 1.16.5Java 8
1.7.10 to 1.11Java 8
Check installed Java
java -version

Memory settings

Do not give Java all the memory on the machine. Leave room for the operating system, backups, monitoring, and other background work.

What affects memory?

  • View distance and simulation distance
  • Number of loaded worlds
  • Player count and chunk activity
  • Datapacks and plugins
  • Large farms or redstone-heavy areas
Practical rule

Start lower, watch the logs, then increase memory if the server actually needs it. Very large memory values can make garbage collection pauses worse.