2
In Java every class has to be loaded by some class loader.
在Java中,每個類都必須由一些類加載器加載。
How is the first class loaded? It has to be loaded through some class loader (which is just another class), so without some special code this would lead to infinity recursion.
如何加載第一堂課?它必須通過一些類加載器(這只是另一個類)加載,因此如果沒有一些特殊的代碼,這將導致無限遞歸。
The class loader that loads the first classes (java.lang.Object, java.lang.Class, java.lang.String, java.lang.ClassLoader and others) can therefore not be a 'normal' class loader.
因此,加載第一個類(java.lang.Object,java.lang.Class,java.lang.String,java.lang.ClassLoader等)的類加載器不能是“普通”類加載器。
It is this class loader that is referenced as the primordial class loader (primordial: from latin, meaning "the first", "the origin(al)")
正是這個類加載器被引用為原始類加載器(原始:來自拉丁語,意思是“第一個”,“起源(al)”)
For further study see the Java Security Aritecture and Securing Java
有關進一步研究,請參閱Java Security Aritecture和Securing Java
Java的类加载机制确保每个类都由类加载器加载,但如何避免在加载过程中产生无限递归?本文探讨了加载第一个类(如java.lang.Object)的特殊性,指出其加载器——原始类加载器(primordial classloader)的重要性,它是解决此问题的关键。进一步了解Java安全架构和Java安全相关的知识将有助于深入理解这一机制。
32万+

被折叠的 条评论
为什么被折叠?



