Print All JVM Flags

Sachin Bhansali picture Sachin Bhansali · May 7, 2012 · Viewed 59.3k times · Source

Found an interesting JVM Flag :

java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version

It prints hundreds of various options, I never heard about before. It also prints default values, that helps diagnose JVM behaviors better. Another interesting flag is:

-XX:+UnlockExperimentalVMOptions

Does anyone knows of any documentation which explains each one of them ?

Answer

Andriy Plokhotnyuk picture Andriy Plokhotnyuk · May 7, 2012

Do not miss also -XX:+JVMCIPrintProperties for Graal JIT options.

Before dive into sources you can skim over following extracts and find suitable option faster:

https://chriswhocodes.com/ (OracleJDK 6/7/8/9/10/11/12, OpenJDK 8/9/10/11, Graal CE/EE, OpenJ9, Zing)

http://jvm-options.tech.xebia.fr/

http://www.pingtimeout.fr/2012/05/jvm-options-complete-reference.html

http://stas-blogspot.blogspot.com/2011/07/most-complete-list-of-xx-options-for.html