Here, we use reflection because we have loaded the application using a class loader that is not the system class loader.
这里,我们使用反射的原因是因为我们已经使用非系统类加载器加载了应用程序。
The parent of this class loader will be the class loader of the current thread context.
类加载器的父类加载器将是当前线程上下文的类加载器。
When there is a hierarchy of class loaders, the root class loader, which is the bootstrap class loader, attempts to load the class first.
当类加载器存在一个层次结构时,根类加载器(即引导类加载器)将首先尝试加载类。
Each EAR application should have a unique string name for the class loader. Here, we use the application name in the class loader name to avoid repetition.
这里我们使用应用程序名作为类加载器的名称,以避免重复。
Because the parent class loader is always given the opportunity to load a class first, the class is loaded by the class loader nearest the root.
因为父类类装入器总是先得到装入类的机会,所以类装入器装入的类最靠近根。
Every class loader has a parent class loader, which delegates the searching and loading of a class to its parent (parent-first delegation) before it attempts to load the class itself.
每个类加载器有一个父类加载器,在尝试加载类本身时,先将类搜索和类加载委托给它的父加载器,即父加载器优先(parent-first)委托。
Web modules within the J2EE application are loaded using a WAR class loader that is a child of the application class loader for the enterprise application containing the Web module.
J2EE应用程序中的Web模块通过war类加载器来加载,这个类加载器是企业应用程序中的应用程序类加载器的一个子类。
For example, the selected class loader in Figure 5 now shows that it is the class loader for the PlantsByWebSphere Web application.
例如,图5中选中的类加载器显示它是PlantsByWebSphereweb应用程序的类加载器。
By throwing a ClassNotFoundException, the class loader informs you that the bytecode required to define the class is simply not present in the locations where the class loader is looking for it.
通过抛出ClassNotFoundException,类装入器提示,定义类时所需要的字节码在类装入器所查找的位置上不存在。
By default, this class loader is the parent of any class loader created by the user.
默认情况下,这个类装入器是用户创建的任何类装入器的父类。
Each class loader also keeps a reference to a parent class loader, defining a tree of class loaders with the bootstrap loader at the root.
每个类装入器还保留对父类装入器的引用,这样就定义了类装入器树,树根为引导程序装入器。
To avoid this problem, any classes that are to be serialized should be loaded by a class loader that does not need to be garbage collected — by the system class loader, for example.
为了避免这个问题,凡是要进行序列化的类,都应当由不需要被垃圾收集的类装入器装入——例如由系统类装入器装入。
A class loader namespace is a combination of a class loader and all the classes that it has loaded.
类装入器的命名空间是类装入器和它装入的所有类的组合。
Class a is on the classpath of the system class loader, and a's superclass, B, is on the classpath of a user-defined class loader, which is a child of the system class loader.
类a在系统类装入器的类路径中,而A的超类b,在用户自定义的类装入器的类路径中,这个类装入器是系统类装入器的孩子。
As an example of a class loader hierarchy in action, Figure 1 shows the class loader hierarchy defined by the Tomcat servlet engine.
作为类装入器层次结构的实际示例,图1显示了Tomcatservlet引擎定义的类装入器层次结构。
The system class loader (also known as the application class loader) is the class loader responsible for loading code from the path specified by the CLASSPATH environment variable.
系统(system)类装入器(也称作应用程序类装入器)负责从CLASSPATH环境变量指定的路径装入代码。
This tells the class loader that will load our Grails app, to ignore any classes from these packages available to the parent class loader (i.e., the container's class loader).
这将告诉装载Grails应用程序的类装载程序忽略这些包中可用于父类装载程序(即,容器的类装载程序)的所有类。
The extension class loader (also known as the standard extensions class loader) is a child of the bootstrap class loader.
扩展(extension)类装入器(也称作标准扩展 类装入器)是引导类装入器的一个孩子。
The Classloader summaries section provides details about each class loader in the system, including the type of the class loader.
Classloader汇总部分提供了系统中每个类装入器的细节。
For instance, classes in the system class loader class space should not refer to classes in the class space of a child or a descendant class loader.
例如,在系统类别载入器类别空间中的类别,不应当指向孩子或子孙类别载入器的类别空间中的类别。
For instance, classes in the system class loader class space should not refer to classes in the class space of a child or a descendant class loader.
例如,在系统类别载入器类别空间中的类别,不应当指向孩子或子孙类别载入器的类别空间中的类别。
应用推荐