December 1999
Intermediate to advanced
816 pages
20h 27m
English
You have seen how to create a policy file that uses predefined permissions. It may be the case, however, that your application needs to define its own permissions. This is easy to do in Java.
You can check to see if a specific permission has been granted to your code by creating a Permission object of that type, such as a FilePermission object. Then you can check for that permission using the checkPermission() method of the AccessController class. This method does not return a value. If you have the permission, the method simply completes. If you do not have the permission, or if the values specified in the permission object that is the parameter to the checkPermission method are ...
Read now
Unlock full access