本文介绍了如何加载Java Bootstrap类加载器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在java中,据说所有类都是由类加载器加载的。

In java, it is said that all the classes are being loaded by classloaders.

首先,bootstrap类加载器加载所有rt.jar类。 / p>

So first of all, bootstrap classloader loads all the rt.jar classes.

请解释。

推荐答案

答案:当JVM启动时,会运行一大块机器代码来加载系统类加载器。此机器代码称为 Bootstrap / Primordial (或有时 - Null )类加载器。

Answer : When a JVM starts up, a special chunk of machine code runs that loads the system classloader. This machine code is known as the Bootstrap / Primordial (or sometimes - Null) classloader.

与所有其他类加载器一样,它根本不是Java类。引导类加载器是特定于平台的机器指令,它启动整个类加载过程。

It is not a Java class at all, as are all other classloaders. The bootstrap classloader is platform specific machine instructions that kick off the whole classloading process.

所有类加载器(除了引导类加载器)都实现为Java类。必须加载第一个Java类加载器才能获得过程开始了。加载第一个纯Java类加载器是引导类加载器的工作。

All classloaders, with the exception of the bootstrap classloader, are implemented as Java classes. Something must load the very first Java classloader to get the process started. Loading the first pure Java classloader is the job of the bootstrap classloader.

引导类加载器还负责加载支持基本Java运行时环境所需的所有代码( JRE),包括java.util和java.lang包中的类。

The bootstrap classloader also takes care of loading all of the code needed to support the basic Java Runtime Environment (JRE), including classes in the java.util and the java.lang packages.

来源:

这篇关于如何加载Java Bootstrap类加载器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 06:50