Class Permissions

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.Permissions
All Implemented Interfaces:
Cloneable

public class Permissions extends ProjectComponent
This class implements a security manager meant for usage by tasks that run inside the Ant VM. An examples are the Java Task and JUnitTask.

The basic functionality is that nothing (except for a base set of permissions) is allowed, unless the permission is granted either explicitly or implicitly. If a permission is granted this can be overruled by explicitly revoking the permission. It is not permissible to add permissions (either granted or revoked) while the Security Manager is active (after calling setSecurityManager() but before calling restoreSecurityManager()).

Note: This class isn't supported in Java 18 and higher where SecurityManager has been deprecated for removal.

Since:
Ant 1.6