sysprop

查看/修改JVM的系统属性

命令选项 描述
-h, --help 帮助
<prop-name> 属性名
<prop-value> 属性值

示例

# 查看所有系统属性
[arthas@10580]$ sysprop
sun.desktop                       windows
awt.toolkit                       sun.awt.windows.WToolkit
file.encoding.pkg                 sun.io
java.specification.version        1.8
sun.cpu.isalist                   amd64
...
java.rmi.server.disableHttp       true
java.ext.dirs                     D:\tools\JDK8\jre\lib\ext;C:\windows\Sun\Java\lib\ext
sun.io.unicode.encoding           UnicodeLittle
apple.awt.UIElement               true
java.class.version                52.0

# 查看指定属性值
[arthas@10580]$ sysprop user.home
user.home                         C:\Users\A

# 修改属性值
[arthas@10580]$ sysprop  user.country
KEY                               VALUE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
user.country                      CN
[arthas@10580]$ sysprop  user.country US
Successfully changed the system property.
KEY                               VALUE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
user.country                      US