Use AccessController to check the AWT permission

by Mohan 2012-09-21 13:40:34

Use AccessController to check the AWT permission


import java.awt.AWTPermission;
import java.io.FilePermission;
import java.security.AccessController;

public class MainClass {
public static void main(String args[]) throws Exception {

AWTPermission ap = new AWTPermission("accessClipboard");
AccessController.checkPermission(ap);
}
}

503
like
0
dislike
0
mail
flag

You must LOGIN to add comments