Here, we use reflection because we have loaded the application using a class loader that is not the system class loader.
这里,我们使用反射的原因是因为我们已经使用非系统类加载器加载了应用程序。
It also shows class loader information — again, this is simple because the application is so simple.
它还展示了类加载器信息——再说一遍,这很简单,因为应用程序太简单了。
It USES the system class loader to achieve this.
它使用系统类装载程序来达到这个目的。
An application class loader leak occurs when applications are restarted but their class loaders are not cleaned up.
当应用程序重启但它们的类加载器没有清理时,将发生应用程序类加载器泄露。
But how can that work if the class loader looks for existing class files for each class it loads?
但是,如果类装入器为它所装入的每个类查找现有类文件,那么它会如何工作呢?
The class loader has a fairly tight security manager in place that restricts malicious calls.
类加载器有一个十分严格的安全管理器来限制恶意调用。
The parent of this class loader will be the class loader of the current thread context.
类加载器的父类加载器将是当前线程上下文的类加载器。
This implementation assumes that all classes required are on the classpath of this class loader.
这个实现假设所有需要的类都在这个类装入器的类路径中。
When there is a hierarchy of class loaders, the root class loader, which is the bootstrap class loader, attempts to load the class first.
当类加载器存在一个层次结构时,根类加载器(即引导类加载器)将首先尝试加载类。
The method now delegates to its parent class loader before attempting to find the class itself.
方法现在在试图自己找到类之前,先委托给自己的双亲类装入器。
It also indicates which class loader loads a given class and where it loads it from.
它还可以指出指定类是由哪个类装入器装入的、从哪里装入的。
Because all four conditions hold, this situation results in a class loader constraint violation.
因为四个条件全部成立,所以这种情况会导致类装入器约束违反。
This article, the final installment in this four-part series, examines class loader deadlocks and constraint violations.
本文是本系列中的四篇文章的最后一篇,它研究了类装入器死锁和约束违反。
The ClassLoader loaded classes section lists the classes loaded by each class loader.
类装入器装入的类部分列出了每个类装入器装入的类。
The class loader plays an important role in linking a native call to its appropriate native definition.
在把本机调用链接到对应的本机定义时,类装入器扮演着重要角色。
This particular class loader has some special features.
这个特殊的类装入器有一些专门的特性。
Next is the class loader cache initialization.
下一步是类装载器缓存初始化。
The garbage collector interacts closely with the class loader.
垃圾收集器与类装入器的交互很密切。
Bootstrap isn't the only class loader.
引导程序不是唯一的类装入器。
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.
这里我们使用应用程序名作为类加载器的名称,以避免重复。
The proxy will create one instance of a class loader for each XML schema version.
代理将为每个XML模式版本创建一个类实例。
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.
因为父类类装入器总是先得到装入类的机会,所以类装入器装入的类最靠近根。
Notice that there is no output for the bootstrap class loader.
请注意,引导类装入器没有输出。
Lists of classes loaded by each class loader.
每个类装入器装入的类的列表。
Avoiding class loader constraint violations.
避免类装入器约束违反。
Resolving class loader constraint violations
解决类装入器约束违反
NextGen example: Modified class loader.
NextGen示例:修改的类装入器。
By default, this class loader is the parent of any class loader created by the user.
默认情况下,这个类装入器是用户创建的任何类装入器的父类。
Both threads will wait indefinitely for the lock on the other class loader, and so they become deadlocked.
两个线程都会无限期地等候另一个类装入器上的锁,所以它们就变成了死锁的。
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.
每个类装入器还保留对父类装入器的引用,这样就定义了类装入器树,树根为引导程序装入器。
应用推荐