JDK 运行参数 JAVA -Dxxx与System.setProperty()的关系
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
通常运行时的参数设置为:
相当与在java代码里面
从java里面取得:
- #for linux
- export JAVA_OPTS="$JAVA_OPTS -Dcode=BeiJing"
- #for win
- set JAVA_OPTS=%JAVA_OPTS% -Dcode=BeiJing
或者
- #for linux
- java -Dcode=BeiJing -jar test.jar aa
相当与在java代码里面
- System.setProperty("code","BeiJing");
从java里面取得:
- String code = System.getProperty("code");
特此记下。




A beautiful web dashboard for Linux
最近提交(Master分支:8 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)