JVM配置参数

-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

 

posted @   Clotho_Lee  阅读(52)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
点击右上角即可分享
微信分享提示