-XX
标准选择(Standard Options)
These are the most commonly used options that are supported by all implementations of the JVM.
示例:
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnable -XX:+UseFastAccessorMethods
-X
非标准选择(Non-Standard Options)
These options are general purpose options that are specific to the Java HotSpot Virtual Machine.
示例:
-Xmx256m -Xms256m -Xmn768m -Xss256k
-D
设置系统属性值(Sets a system property value)
-D属性名称=属性值
Sets a system property value. The property variable is a string with no spaces that represents the name of the property.
The value variable is a string that represents the value of the property. If value is a string with spaces, then enclose it in quotation marks (for example -Dfoo="foo bar").
示例:
-Dspring.profiles.active=release -Dspring.config.location=/opt/app/conf/
* 如果属性值中间有空格,需要用双引号括住,例如-Dclotho="clotho property value"
在IDEA中通过Run/Debug configurations中的VM.options配置
* 如果默认没显示,可点击Build and run右边的Modify options -> Java -> Add VM options