This method of the ExecutionPermission Class explicitly excludes applications from the set of programs that the permission allows.
public void excludeApplications(String pattern);
pattern | The pattern that specifies the applications that are explicitly prohibited. It can contain wildcard expressions. |
Because all applications are prohibited by default, this call is only useful to remove programs from an expression that was previously added with an includeApplications call. For example, the following code creates an ExecutionPermission object that allows access to all .exe applications, except Notepad.exe:
... ExecutionPermission eperm = new ExecutionPermission() eperm.includeApplications("*.exe"); eperm.excludeApplications("notepad.exe"); ...
Note This method does nothing if the permission object already specifies unrestricted access.