Java JVM 选项的完整列表

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43087831/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 00:40:37  来源:igfitidea点击:

Complete list of JVM options

javajvmopenjdkjvm-hotspot

提问by Nolequen

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

除了官方文档,我只找到了这篇文章。但它很旧而且不完整(只有-XX选项可用)。例如,我-XX:AutoBoxCacheMax在它们中都找不到选项。

Where the complete list can be found if it exists?

如果存在完整列表,在哪里可以找到?

采纳答案by Svetlin Zarev

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

PS:这篇博文中对大部分都有描述:http: //stas-blogspot.blogspot.bg/2011/07/most-complete-list-of-xx-options-for.html