简体   繁体   中英

How to set a system property via envirnmoent variable?

I need to set a system property via environment variable a then get access it with System.properties['propName'] . I tried several patterns:

SET org.gradle.project.systemProp.buildRate=10
SET org.gradle.project.buildRate=10
SET ORG_GRADLE_PROJECT_buildRate=10
SET ORG_GRADLE_PROJECT_systemProp.buildRate=10

but none of these worked. How to do that?

它们是不同的事情,您可以设置环境变量并使用System.getenv()读取它,或者设置系统属性并使用System.getProperties()读取它。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM