C语言的逻辑运算符探究
关于java中System.in与System.out的思考

Java的ClassLoader机制

tcsong posted @ Fri, 28 Aug 2009 05:11:16 -1100 in Programming Language with tags java , 1359 readers

本文部分内容翻译自ri的java document

ClassLoader,顾名思义,就是用来加载class的。java程序中的所有class都要经由某个classloader的子类来加载

大体上而言,bootstrap classloader负责加载vm启动时所引用的class,extention classloader加载虚拟机需要的扩展class,而system classloader则负责从classpath中寻找各种各样的类

除了bootstrap classloader外,每一个classloader都有一个parent classloader(这是一个field,不是继承关系中的parent),当需要加载一个类时,首先查找这个类是否已经加载过;如果没有,则交由parent classloader去加载;如果parent classloader不能加载,那就由自己加载。当然其中一系列复杂的路径处理权限管理过程被我略掉了。

 

Avatar_small
Emma said:
Sun, 30 Oct 2022 01:58:40 -1100

Good to see the information regarding the java class loader you have discussed over here. The Java Class Loader is a part of the Java Runtime Environment that dynamically Lab grown diamonds loads Java classes into the Java Virtual Machine. You will get more details about it from here and keep sharing more updates on that.


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter