In my Groovy script I have this code:
def username = System.getenv()['USER']
def password = System.getenv()['PASS']
It is because I can't use this information as parameter to Groovy script, because other users shouldn't know it. When I run this script I set this parameter in my system. Now I have a problem. I have a Java application which runs Groovy script remotely. Is there some way that I can set enviromental variable in Java code? (Here I found that it isn't possible). Or is there some safe ways to send this properties from Java to Groovy?