33

Besides official documentation I have found only this post. But it is quite old and incomplete (only -XX options available). For example, I couldn't find -XX:AutoBoxCacheMax option in none of them.

Where the complete list can be found if it exists?

iehrlich
  • 3,572
  • 4
  • 34
  • 43
Nolequen
  • 3,032
  • 6
  • 36
  • 55
  • Voted to close as off-topic but it's also a dup of http://stackoverflow.com/questions/10486375/print-all-jvm-flags – alain.janinm Mar 29 '17 at 08:54
  • 2
    And I think you're not likey to find a documentation that expose all `-XX` option, as stated in Oracle doc `Options that are specified with -XX are not stable and are subject to change without notice.` so a documentation would be hard to maintain. I guess they don't won't to struggle with that. The best you can have is probably http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (replace unix by windows if you're on it) – alain.janinm Mar 29 '17 at 09:04

1 Answers1

56

You can use

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

to print all options and their defaults. If you have a debug build you can use this command to print comments for the various options as well:

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

PS: There are descriptions for most of them in this blog post: http://stas-blogspot.blogspot.bg/2011/07/most-complete-list-of-xx-options-for.html

Svetlin Zarev
  • 14,713
  • 4
  • 53
  • 82