System.getProperty的作用是能够得到jvm的系统属性

jvm的系统属性配置有三种方式:

1:通过eclipse

System.getProperty得到jvm系统属性

2:执行java命令
java -Dxxx=hello -jar xxx.jar

3:通过linux脚本

在xxx.sh中加入

-Dxxx=xxx

相关文章: