Skip to content

Java

Java Versions

Minecraft Download Page Linux Shell Command
<= 1.15 Java 8 sudo apt install openjdk-8-jdk
1.16 Java 8 OR Java 11 sudo apt install openjdk-11-jdk
1.17 Java 16 sudo apt install openjdk-16-jdk
1.18+ Java 17 sudo apt install openjdk-17-jdk
1.21+ Java 21 sudo apt install openjdk-21-jdk

On the download page sort for your Operating System and your Architecture (This should typically be x64)

Other Java Download Links

Amazon Corretto, Azul Zulu, or Oracle JDK


Java Arguments

These can help both server and client with performance in,

  • Reducing Ram Usage. (GC will clean up more efficiently)
  • Reduced Lag Spikes. (GC will clean more frequently, reducing large lag spikes)

Client Arguments

These can be set in your Launcher

Curseforge Launcher

If you’re using the Curseforge Launcher, open your Settings, choose Minecraft and scroll down to these Settings.

ATLauncher

Open your pack Settings, click Java/Minecraft and put your args into the big Java Parameters box.

Default Java 8-11 Client Arguments
-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=32M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true
Default Java 17+ Client Arguments
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Default Java 21 Client Arguments
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
Java 21 Client Arguments | If you have lots of ram (12GB+), try ZGC
-XX:+UseZGC -XX:+ZGenerational -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem -XX:+UseDynamicNumberOfGCThreads

Server Arguments

These are set in the user_jvm_args.txt file in your server folder

Default Java Server Arguments
-Xms4G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1
Java Server Arguments | For fast CPUs with 4+ cores & lots of ram (8-12GB), try ZGC:
-Xms8G -Xmx12G -XX:+UseZGC -XX:+ZGenerational -XX:SoftMaxHeapSize=10g -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem -XX:+UseDynamicNumberOfGCThreads

All The Mods | GitHub | Discord