Deprecated
for removal since 17.
This class is only useful in conjunction with the Security Manager, which is deprecated and subject to removal in a future release. Consequently, this class is also deprecated and subject to removal. There is no replacement for the Security Manager or this class.
This exception is thrown by the AccessController
to indicate
that a requested access (to a critical system resource such as the
file system or the network) is denied.
The reason to deny access can vary. For example, the requested permission might be of an incorrect type, contain an invalid value, or request access that is not allowed according to the security policy. Such information should be given whenever possible at the time the exception is thrown.
Modifier and Type | Field and Description |
---|---|
private Permission | perm
The permission that caused the exception to be thrown. |
private static final long |
Access | Constructor and Description |
---|---|
public | AccessControlException(String
the detail message. s)Constructs an |
public | AccessControlException(String
the detail message. s, Permission the permission that caused the exception. p)Constructs an |
Modifier and Type | Method and Description |
---|---|
public Permission | Returns: the Permission object.Gets the |
perm | back to summary |
---|---|
private Permission perm The permission that caused the exception to be thrown. |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides java. |
AccessControlException | back to summary |
---|---|
public AccessControlException(String s) Constructs an
|
AccessControlException | back to summary |
---|---|
public AccessControlException(String s, Permission p) Constructs an
|
getPermission | back to summary |
---|---|
public Permission getPermission() Gets the
|