共 3 篇文章 |
|
JVM在运行时会产生三个ClassLoader,Bootstrap ClassLoader、Extension ClassLoader和AppClassLoader.其中,Bootstrap是用C++编写的,我们在Java中看不到它,是null。因为要加载java.lang.String类时,系统最终会由Bootstrap进行加载,这个具有破坏性的String永远没有机会加载。也就是说,A调用了B,所以B由A的类加载器ExtClassLoader来加载。... 阅445 转5 评0 公众公开 08-04-04 22:43 |
分别把两个client提交给服务器执行, (即便执行程序中得client1.bat 和 client2.bat server监控屏幕如图6所示。)纵观上面三次执行结果,发现由于服务器启动得时候使用了AppClassLoader.所以无论怎么样都是载入得是client2(因为client2的classpath次序比较在前),这个类FileSystemClassLoader 被client使用了,用来定义class, 并且把它把client... 阅435 转8 评0 公众公开 08-04-04 22:11 |