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