Java tutorial
//package com.java2s; import java.security.AccessController; import java.security.PrivilegedAction; public class Main { /** * Gets a boolean property as a privileged action. */ public static boolean getPrivilegedBoolean(final String property_name) { return AccessController.doPrivileged(new PrivilegedAction<Boolean>() { public Boolean run() { return Boolean.getBoolean(property_name); } }); } }