#
🚀 Java Arguments Guide
This guide is for advanced users only. If you're not sure what you're doing, it's best to stick with the default settings. Expanse Panel already uses Aikar’s optimized flags — a reliable setup that balances performance and stability for most servers.
This guide covers how to properly structure Java startup arguments when configuring your server through the Expanse Panel.
#
💡 What are Java Arguments?
Java arguments are flags you pass to the Java Virtual Machine (JVM) to control behavior such as memory usage, garbage collection, performance tuning, and more. They can significantly impact your server’s performance — for better or worse.
#
✅ Why Stick With the Default?
Expanse uses Aikar’s recommended flags out of the box. These arguments are:
- Optimized for Minecraft servers
- Widely used and trusted in the community
- Balanced for both performance and stability
If you're unsure what a flag does, we strongly recommend keeping the default setup.
#
🔧 How to Change Java Arguments
- Log in to the Expanse Panel
- Select your server from the Servers list
- Navigate to the Startup tab
- Locate the Java Arguments field
- Modify the arguments as needed and save
#
🔁 Common Java Arguments (just copy and paste)
Aikar's Flags (default) - Uses G1GC
--add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20
Hilltty's flags (Github) - Uses ShenandoahGC
--add-modules=jdk.incubator.vector -XX:+UseLargePages -XX:LargePageSizeInBytes=2M -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:+UseNUMA -XX:+AlwaysPreTouch -XX:-UseBiasedLocking -XX:+DisableExplicitGC -Dfile.encoding=UTF-8
ZGC (Github) - Uses ZGC
--add-modules jdk.incubator.vector -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+ZGenerational -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem -XX:+UseStringDeduplication -XX:+UseTransparentHugePages -XX:+ParallelRefProcEnabled -XX:+EnableDynamicAgentLoading -Dfile.encoding=UTF-8
⚠️ Warning! Changing Java arguments can lead to server instability or crashes if not done correctly. If you experience issues after modifying them, revert to the default settings.