How do you get a java runtime environment variable

1
0
-1

In my process I have a task with a groovy script that needs a condition based on the Java runtime environment variables.

ie. -Denvironment=production vs. -Denvironment=development

How can I access this in my Groovy script?

Comments

Submitted by Jerome.Jargot on Tue, 06/04/2019 - 17:46

Hi,

Like you would do in Java. Have you tried the line below?

String env = System.getProperty("environment");

Regards,
Jerome

Submitted by mike.norris_1369709 on Tue, 06/04/2019 - 17:47

Exactly

No answers yet.
Notifications