Java versions for Minecraft
June 8, 2025

What Java version should I use for Minecraft?

This is my suggestion not a requirement. For example, Minecraft 1.8 can use Java 6.

There are 3 Java versions for Minecraft:

  • Java 8 (,1.16]: Minecraft 1.16 and older.
  • Java 17 (1.16, 1.20.5): Minecraft 1.20.5 and older.
  • Java 21 [1.20.5,): Minecraft 1.20.5 and newer.

What JDK distro should I use?

Differences between each distro are not that significant, at least not when it comes to gaming. If someone ask me what distro I am using, I’ll say GraalVM. Its performance is slightly better than other distros. However, it only supports Java 17 and newer. So if you are using Java 8, you can use any distros like Azul Zulu, etc.

Memory allocation

Minimum and maximum (-Xms and -Xmx) memory should be set to the same value, as explained here. However, if you are on a low-memory system, and Minecraft takes up almost all your memory, set your minimum memory below your maximum memory to conserve as much as possible. Sizes are set in Megabytes (-Xms4096M) or Gigabytes (-Xmx8G)

I personally allocate 6GB for Minecraft, it is enough for most of modpacks.