java class loader
1>boys
class file
|
|
class loader
|
|
jvm->zijima
2>Java Three class loader
boot,ext,app is used to load class, they are father,child relation
ext, app belong a class(ClassLoader, ), boot is a ClassLoader type
3> app could have child
4>Thread,class loader
Thread has its own class loader, it use it the load the class, the load's behavior is "try to ask its parent to load, once parent load it, all the child could use it ,and this will improve the effeience" That's a very good design.
5>We could override the findclass method to define our own class, don't override the loadclass method, this is a template method patern, before that we need make sure its father couldn't load it
6>By default, each Thread's classloader's object is same sun.misc.Launcher$AppClassLoader@6d6f0472