private Map < String , String > getEnvironment ( ) { return AccessController . doPrivileged ( new PrivilegedAction < Map < String , String > > ( ) { @ Override public Map < String , String > run ( ) { return System . getenv ( ) ; } } ) ; }
Get the system environment variables in a doPrivileged block .