public static void main(String[] args) throws Exception {
if (System.getSecurityManager() == null) {
System.setSecurityManager(new SecurityManager());
}
Policy policy = new PolicyFileProvider();
checkPermissions(policy, "file:/foo.jar",
new Permission[]{
new GrantPermission(new RuntimePermission("A")),
new GrantPermission(new RuntimePermission("B")),