Microsoft SDK for Java

excludeApplications

This method of the ExecutionPermission Class explicitly excludes applications from the set of programs that the permission allows.

Syntax

public void excludeApplications(String pattern);

Parameters

pattern The pattern that specifies the applications that are explicitly prohibited. It can contain wildcard expressions.

Remarks

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.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.