1 19 24 25 package org.netbeans.modules.j2ee.sun.api; 26 27 import java.security.PermissionCollection ; 28 import java.security.CodeSource ; 29 import java.security.Permissions ; 30 import java.security.AllPermission ; 31 import java.io.File ; 32 import java.net.URL ; 33 import java.net.URLClassLoader ; 34 import java.net.MalformedURLException ; 35 36 37 38 public class ExtendedClassLoader extends URLClassLoader { 39 40 41 public ExtendedClassLoader() throws MalformedURLException , RuntimeException { 42 super(new URL [0]); 43 } 44 45 public ExtendedClassLoader( ClassLoader _loader) throws MalformedURLException , RuntimeException { 46 super(new URL [0], _loader); 47 } 48 49 50 public void addURL(File f) throws MalformedURLException , RuntimeException { 51 if (f.isFile()){ 52 addURL(f.toURI().toURL()); 53 } 54 } 55 56 57 58 59 protected PermissionCollection getPermissions(CodeSource _cs) { 60 Permissions p = new Permissions (); 61 p.add(new AllPermission ()); 62 return p; 63 } 64 65 } 66 | Popular Tags |