src/share/classes/sun/misc/Launcher.java

Print this page

        

@@ -36,11 +36,10 @@
 import java.util.HashSet;
 import java.util.StringTokenizer;
 import java.util.Set;
 import java.util.Vector;
 import java.security.AccessController;
-import java.security.AllPermission;
 import java.security.PrivilegedAction;
 import java.security.PrivilegedExceptionAction;
 import java.security.AccessControlContext;
 import java.security.PermissionCollection;
 import java.security.Permissions;

@@ -115,22 +114,10 @@
      */
     public ClassLoader getClassLoader() {
         return loader;
     }
 
-    public static void addURLToAppClassLoader(URL u) {
-        AccessController.checkPermission(new AllPermission());
-        ClassLoader loader = Launcher.getLauncher().getClassLoader();
-        ((Launcher.AppClassLoader) loader).addAppURL(u);
-    }
-
-    public static void addURLToExtClassLoader(URL u) {
-        AccessController.checkPermission(new AllPermission());
-        ClassLoader loader = Launcher.getLauncher().getClassLoader();
-        ((Launcher.ExtClassLoader) loader.getParent()).addExtURL(u);
-    }
-
     /*
      * The class loader used for loading installed extensions.
      */
     static class ExtClassLoader extends URLClassLoader {
 

@@ -245,15 +232,10 @@
                 prevDir = dir;
             }
             return null;
         }
 
-        protected Class findClass(String name) throws ClassNotFoundException {
-            BootClassLoaderHook.preLoadClass(name);
-            return super.findClass(name);
-        }
-
         private static AccessControlContext getContext(File[] dirs)
             throws IOException
         {
             PathPermissions perms =
                 new PathPermissions(dirs);

@@ -314,11 +296,10 @@
          * Override loadClass so we can checkPackageAccess.
          */
         public Class loadClass(String name, boolean resolve)
             throws ClassNotFoundException
         {
-            BootClassLoaderHook.preLoadClass(name);
             int i = name.lastIndexOf('.');
             if (i != -1) {
                 SecurityManager sm = System.getSecurityManager();
                 if (sm != null) {
                     sm.checkPackageAccess(name.substring(0, i));

@@ -371,15 +352,11 @@
             AccessControlContext acc =
                 new AccessControlContext(new ProtectionDomain[] { domain });
 
             return acc;
         }
-
-        void addAppURL(URL url) {
-            super.addURL(url);
         }
-    }
 
     private static class BootClassPathHolder {
         static final URLClassPath bcp;
         static {
             URL[] urls;

@@ -411,15 +388,11 @@
             bcp = new URLClassPath(urls, factory);
         }
     }
 
     public static URLClassPath getBootstrapClassPath() {
-        URLClassPath bcp = BootClassPathHolder.bcp;
-        // if DownloadManager is installed, return the bootstrap class path
-        // maintained by the Java kernel
-        BootClassLoaderHook hook = BootClassLoaderHook.getHook();
-        return hook == null ? bcp : hook.getBootstrapClassPath(bcp, factory);
+        return BootClassPathHolder.bcp;
     }
 
     private static URL[] pathToURLs(File[] path) {
         URL[] urls = new URL[path.length];
         for (int i = 0; i < path.length; i++) {