循环、迭代、遍历和递归
2012-07-24 14:18
357 查看
Java Classloader Hierarchy
Classloaders contain a hierarchy with parent classloaders and childclassloaders. The relationship between parent and child classloaders is
analogous to the object relationship of super classes and subclasses.
The bootstrap classloader is the root of the Java classloader hierarchy.
The Java virtual machine (JVM) creates the bootstrap classloader, which
loads the Java development kit (JDK) internal classes and java.*
packages included in the JVM. (For example, the bootstrap classloader
loads java.lang.String.)
The extensions classloader is a child of the bootstrap classloader. The
extensions classloader loads any JAR files placed in the extensions
directory of the JDK. This is a convenient means to extending the JDK
without adding entries to the classpath. However, anything in the
extensions directory must be self-contained and can only refer to
classes in the extensions directory or JDK classes.
The system classpath classloader extends the JDK extensions classloader.
The system classpath classloader loads the classes from the classpath
of the JVM. Application-specific classloaders (including WebLogic Server
classloaders) are children of the system classpath classloader.
Loading a Class
Classloaders use a delegation model when loading a class. Theclassloader implementation first checks its cache to see if the
requested class has already been loaded. This class verification
improves performance in that its cached memory copy is used instead of
repeated loading of a class from disk. If the class is not found in its
cache, the current classloader asks its parent for the class. Only if
the parent cannot load the class does the classloader attempt to load
the class. If a class exists in both the parent and child classloaders,
the parent version is loaded. This delegation model is followed to avoid
multiple copies of the same form being loaded. Multiple copies of the
same class can lead to a ClassCastException.
Classloaders ask their parent classloader to load a class before attempting to load the class themselves.
from: http://docs.oracle.com/cd/E15051_01/wls/docs103/programming/classloading.html
相关文章推荐
- 专业术语:迭代、循环、遍历与递归的区别
- 循环、迭代、递归、遍历
- 循环(loop), 递归(recursion), 遍历(traversal), 迭代(iterate)的区别
- 循环、递归、遍历、迭代的区别
- Atitit 循环(loop), 递归(recursion), 遍历(traversal), 迭代(iterate).
- 循环、递归、迭代、遍历
- Atitit 循环(loop), 递归(recursion), 遍历(traversal), 迭代(iterate).
- 编程中,循环、迭代、遍历和递归之间的区别
- javascript递归、循环、迭代、遍历和枚举概念
- 递归 循环 迭代 遍历
- 循环、递归、迭代和遍历的区别
- 【转】循环、迭代、遍历和递归
- 循环、迭代、遍历和递归
- 简单辨析:循环、递归、迭代、遍历
- 循环、迭代、遍历和递归
- 专业术语之------迭代,循环,遍历,递归的区别
- 二叉树的三种遍历方式的循环和递归的实现方式
- 二叉树的几种遍历方法,包括递归和迭代
- 二叉树的三种遍历方式的循环和递归的实现方式
- c++学习之前序递归遍历二叉树和中序循环遍历二叉树