def env = System.getenv()//Print all the environment variables. env.each{ println it } // You can also access the specific variable, say 'username', as show below String user= env['USERNAME']
©Mytechtoday
TOP