Java tutorial
//package com.java2s; import java.security.AccessController; import java.security.PrivilegedAction; public class Main { private static String getPrivilegedProperty(final String property_name) { return AccessController.doPrivileged(new PrivilegedAction<String>() { public String run() { return System.getProperty(property_name); } }); } }