public static void addPermission(Permission perm,ClassLoader loader){
  for (; loader != null; loader=loader.getParent()) {
    if (loader instanceof EnvironmentClassLoader) {
      EnvironmentClassLoader envLoader=(EnvironmentClassLoader)loader;
      envLoader.addPermission(perm);
    }
  }
}

public static void addPermission ( Permission perm , ClassLoader loader ) { for ( ; loader != null ; loader = loader . getParent ( ) ) { if ( loader instanceof EnvironmentClassLoader ) { EnvironmentClassLoader envLoader = ( EnvironmentClassLoader ) loader ; envLoader . addPermission ( perm ) ; } } }
adds a permission to the current environment .
