jdk/src/share/classes/java/lang/ClassLoader.java
changeset 8552 f36470084574
parent 7803 56bc97d69d93
child 8789 23f273e43be9
equal deleted inserted replaced
8551:0806d3de30ab 8552:f36470084574
    49 import java.util.Map;
    49 import java.util.Map;
    50 import java.util.Vector;
    50 import java.util.Vector;
    51 import java.util.Hashtable;
    51 import java.util.Hashtable;
    52 import java.util.WeakHashMap;
    52 import java.util.WeakHashMap;
    53 import java.util.concurrent.ConcurrentHashMap;
    53 import java.util.concurrent.ConcurrentHashMap;
    54 import sun.misc.BootClassLoaderHook;
       
    55 import sun.misc.ClassFileTransformer;
    54 import sun.misc.ClassFileTransformer;
    56 import sun.misc.CompoundEnumeration;
    55 import sun.misc.CompoundEnumeration;
    57 import sun.misc.Resource;
    56 import sun.misc.Resource;
    58 import sun.misc.URLClassPath;
    57 import sun.misc.URLClassPath;
    59 import sun.misc.VM;
    58 import sun.misc.VM;
  1298 
  1297 
  1299     /**
  1298     /**
  1300      * Find resources from the VM's built-in classloader.
  1299      * Find resources from the VM's built-in classloader.
  1301      */
  1300      */
  1302     private static URL getBootstrapResource(String name) {
  1301     private static URL getBootstrapResource(String name) {
  1303         BootClassLoaderHook.preLoadResource(name);
       
  1304         URLClassPath ucp = getBootstrapClassPath();
  1302         URLClassPath ucp = getBootstrapClassPath();
  1305         Resource res = ucp.getResource(name);
  1303         Resource res = ucp.getResource(name);
  1306         return res != null ? res.getURL() : null;
  1304         return res != null ? res.getURL() : null;
  1307     }
  1305     }
  1308 
  1306 
  1812     }
  1810     }
  1813 
  1811 
  1814     // Invoked in the java.lang.Runtime class to implement load and loadLibrary.
  1812     // Invoked in the java.lang.Runtime class to implement load and loadLibrary.
  1815     static void loadLibrary(Class fromClass, String name,
  1813     static void loadLibrary(Class fromClass, String name,
  1816                             boolean isAbsolute) {
  1814                             boolean isAbsolute) {
  1817         BootClassLoaderHook.preLoadLibrary(name);
       
  1818         ClassLoader loader =
  1815         ClassLoader loader =
  1819             (fromClass == null) ? null : fromClass.getClassLoader();
  1816             (fromClass == null) ? null : fromClass.getClassLoader();
  1820         if (sys_paths == null) {
  1817         if (sys_paths == null) {
  1821             usr_paths = initializePath("java.library.path");
  1818             usr_paths = initializePath("java.library.path");
  1822             sys_paths = initializePath("sun.boot.library.path");
  1819             sys_paths = initializePath("sun.boot.library.path");