Direct answer

Check the exact `-Xmx` value and syntax, the Java runtime architecture, and the memory limit of the host/container. Use a size the environment can reserve; changing Minecraft files will not fix an invalid JVM heap argument.

What it means

The JVM rejected the memory value in the startup command.

If you are a player

  • This is a server-side startup problem. Send the owner the exact panel/console error; reinstalling your game client will not fix it.

If you run the server

Targeted diagnosis: Review the Java startup command for -Xmx and -Xms spelling and units (for example -Xmx4G). Use java -version to confirm the actual executable selected by the panel or service.

  1. Read the first Java/JVM error before the final “server stopped” or panel exit-code summary.
  2. Run java -version in the same shell/container/panel runtime that actually launches the server.
  3. Verify the Java release and JVM arguments against the exact server software/version; remove old or copied flags that the current runtime rejects.
  4. Fix startup/runtime selection before changing world or plugin data, because Minecraft may not have started yet.

Fix and verify: Ensure the selected heap fits inside the host/container memory budget after allowing for off-heap, metaspace, threads and OS use. Lower an impossible heap setting instead of retrying the same command; preserve the original launch arguments for rollback.

Current Paper Java requirements

Paper currently documents Java 21 for Paper 1.20 through 1.21.11 and Java 25 for Paper 26.1+. Other server software or older Minecraft versions can require a different Java release, so check that project’s exact version table.

References

Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000