sysprop
查看/修改JVM的系统属性
命令选项
命令选项 | 描述 |
---|---|
-h, --help | 帮助 |
<prop-name> | 属性名 |
<prop-value> | 属性值 |
示例
bash
# 查看所有系统属性
[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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28