0

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?

Java Man
  • 43
  • 3
  • 2
    the only way i know is java -Dorg.gradle.project.systemProp.buildRate=%org.gradle.project.systemProp.buildRate% (Windows). Or set it manually from java code - see System.getenv() – Sergey Alaev Jan 17 '15 at 09:26

1 Answers1

0

They are different things, you can set an environment variable and read it using System.getenv() or set a system property and read it using System.getProperties().

Community
  • 1
  • 1
Ali Shakiba
  • 20,549
  • 18
  • 61
  • 88