S
stixwix
Hi,
Using Java as it comes 'out the box', the following runs ok:
System.getProperty("user.home");
But if I sub-class SecurityManager thus:
class MySecurityManager extends SecurityManager {}
and then set this up in main:
System.setSecurityManager(new MySecurityManager());
Then the getProperty call throws an access exception.
If i edit the java.policy file to specifically allow this call then it
is ok (this property isn't in the default 'allowed' list).
This implies that the default SecurityManager doesn't use the
java.policy file but I know it does because if you leave a syntax error
in the file you get an exception.
What am I missing here?
Regards,
Andy
Using Java as it comes 'out the box', the following runs ok:
System.getProperty("user.home");
But if I sub-class SecurityManager thus:
class MySecurityManager extends SecurityManager {}
and then set this up in main:
System.setSecurityManager(new MySecurityManager());
Then the getProperty call throws an access exception.
If i edit the java.policy file to specifically allow this call then it
is ok (this property isn't in the default 'allowed' list).
This implies that the default SecurityManager doesn't use the
java.policy file but I know it does because if you leave a syntax error
in the file you get an exception.
What am I missing here?
Regards,
Andy