Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Recommended Java Settings

Fedora 6 requires Java 11. The following Java HotSpot VM Options are recommended for running Fedora 46:

No Format
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -serverXms1G -Xms1024m -Xmx4096m -XX:MaxMetaspaceSize=1024mXmx2G -XX:+UseG1GC -XX:+DisableExplicitGC

For Linux JVMs, see:  http

  • Headless mode is a system configuration in which the display device, keyboard, or mouse is lacking. Sounds unexpected, but actually you can perform different operations in this mode, even with graphic data.




  • Tell the JVM to use UTF-8 as an encoding for text files to be more platform independent


  • Set the initial Java Heap memory size to 1024 Megabytes1 Gigabyte


  • Set the maximal Java Heap memory size to 4096 Megabytes2 Gigabytes


  • Set the maximum size of native memory that can be allocated for class metadata to 1024 Megabytes. This is especially recommended when redeploying Fedora 4 often, since otherwise OutOfMemory errors will occur.
  • Enables the use of the garbage-first (G1) garbage collector. It is a server-style garbage collector, targeted for multiprocessor machines with a large amount of RAM. It meets GC pause time goals with high probability, while maintaining good throughput. The G1 collector is recommended for applications requiring large heaps (sizes of around 6 GB or larger) with limited GC latency requirements (stable and predictable pause time below 0.5 seconds).


  •  Disable calls to System.gc(), JVM still performs garbage collection when necessary.

Other considerations

  • If you expect to be redeploying the Fedora instance often, supplying this setting is helpful to prevent OutOfMemory errors. It sets the maximum size of native memory that can be allocated for class metadata to 1 Gigabyte.
  • Set the maximal amount of memory which will be allowed for the young generation of objects in memory to 1 Gigabyte. Increasing this value will decrease the frequency of minor garbage collections, but increase the frequency of major.