Code example for FilePermission

        PermissionCollection pc = ap.getPermissions(new ProtectionDomain(null,null));
        Permission testPerm = new FilePermission("/tmp","read");
     * Simple test of loading a policy file with a single codebase defined that grants specific  
     * FilePermission.  Then test that read and write were granted but delete was not. 
    public void testSingleCodebaseFilePermissionLoader() throws Exception 
        JettyPolicy ap = new JettyPolicy(  MavenTestingUtils.getTestResourceDir("policy-test-2").getAbsolutePath(), evaluator );
Stop searching for code, let great code find you!  Add Codota to your java IDE