How do I grant a program, after setting RMISecurityManager for the system, the permissions to read and write all of the System properties?
Created May 4, 2012
Dieter Wimberger You have to grant the permission via the policy file. This looks like:
for using
for using
Thus enrolling your own "access policy".
java.util.PropertyPermission "*", "read,write"
for using
java.lang.System public static Properties getProperties() public static void setProperties(Properties props)
or:
java.util.PropertyPermission "{key}", "read"
for using
java.lang.System public static String getProperty(String key) public static String getProperty(String key, String def)You can also override following methods:
checkPropertiesAccess checkPropertyAccess
Thus enrolling your own "access policy".
Be sure to check the /guide/security/permissions.html from the Java 2 JDK documentation you are using.