Code example for Permission

Methods: getName

0
    // custom security manager 
    SecurityManager sm = new SecurityManager() {
        final String forbidenPermissionName = "user.dir"; 
 
        public void checkPermission(Permission perm) { 
            if (perm.getName().equals(forbidenPermissionName)) { 
                throw new SecurityException(); 
            } 
        } 
    }; 
 
    @Override 
    protected void setUp() { 
        resources = Support_Resources.createTempFolder();
    } 
 
    /** 
     * java.util.jar.JarFile#JarFile(java.io.File) 
     */ 
    public void test_ConstructorLjava_io_File() { 
        try {