標(biāo)準(zhǔn)參數(shù)(-),所有的JVM實(shí)現(xiàn)都必須實(shí)現(xiàn)這些參數(shù)的功能,而且向后兼容;
通過命令 java即可查看
如下
非標(biāo)準(zhǔn)參數(shù)(-X),默認(rèn)jvm實(shí)現(xiàn)這些參數(shù)的功能,但是并不保證所有jvm實(shí)現(xiàn)都滿足,且不保證向后兼容;
通過命令 java -X,如下
非Stable參數(shù)(-XX),此類參數(shù)各個(gè)jvm實(shí)現(xiàn)會有所不同,將來可能會隨時(shí)取消,需要慎重使用(但是,這些參數(shù)往往是非常有用的). 通過命令java -XX:+PrintFlagsFinal
[Global flags] uintx AdaptiveSizeDecrementScaleFactor = 4 {product} uintx AdaptiveSizeMajorGCDecayTimeScale = 10 {product} uintx AdaptiveSizePausePolicy = 0 {product} uintx AdaptiveSizePolicyCollectionCostMargin = 50 {product} uintx AdaptiveSizePolicyInitializingSteps = 20 {product} uintx AdaptiveSizePolicyOutputInterval = 0 {product} uintx AdaptiveSizePolicyWeight = 10 {product} uintx AdaptiveSizeThroughPutPolicy = 0 {product} uintx AdaptiveTimeWeight = 25 {product} bool AdjustConcurrency = false {product} bool AggressiveOpts = false {product} intx AliasLevel = 3 {C2 product} bool AlignVector = false {C2 product} intx AllocateInstancePrefetchLines = 1 {product} intx AllocatePrefetchDistance = 192 {product} intx AllocatePrefetchInstr = 0 {product} intx AllocatePrefetchLines = 4 {product} intx AllocatePrefetchStepSize = 64 {product} intx AllocatePrefetchStyle = 1 {product} bool AllowJNIEnvProxy = false {product} bool AllowNonVirtualCalls = false {product} bool AllowParallelDefineClass = false {product} bool AllowUserSignalHandlers = false {product} bool AlwaysActAsServerClassMachine = false {product} bool AlwaysCompileLoopMethods = false {product} bool AlwaysLockClassLoader = false {product} bool AlwaysPreTouch = false {product} bool AlwaysRestoreFPU = false {product} bool AlwaysTenure = false {product} bool AssertOnSuspendWaitFailure = false {product} bool AssumeMP = true {product} intx AutoBoxCacheMax = 128 {C2 product} uintx AutoGCSelectPauseMillis = 5000 {product} intx BCEATraceLevel = 0 {product} intx BackEdgeThreshold = 100000 {pd product}也可以通過-XX:+PrintCommandLineFlags 。這個(gè)參數(shù)的作用是顯示出VM初始化完畢后所有跟最初的默認(rèn)值不同的參數(shù)及它們的值。
這個(gè)參數(shù)至少在Sun JDK 5上已經(jīng)開始支持,Oracle/Sun JDK 6以及Oracle JDK 7上也可以使用。
再下來,-XX:+PrintFlagsInitial 。這個(gè)參數(shù)顯示在處理參數(shù)之前所有可設(shè)置的參數(shù)及它們的值,然后直接退出程序。