What does the documentation about
System#getenv(String) say?
What do you get from the terminal when you write this?
echo $myVar1
How did you set the myVar1 variable in the first place? Have you got such an environment variable at all? Have you spelt it correctly, remembering that Linux systems are usually CaSe SeNsItIvE?
Moving to our Linux forum.