ClassLoader What is the stage, compile and run time of class loading in Java? is class loading the same as class loading?

Source: Internet
Author: User

What is the phase, compile, and run time of class loading in 1.ClassLoader java? is class loading the same as class loading?

: Of course, during the run, I have an understanding of the misunderstanding, corrected as follows: Compile time compiler is not to load class, only responsible for compiling, go to rt.jar take data, not still is class file, JVM is as long as the class file will be able to run.

2. Class load ClassLoader, what is the order of each classloader execution?

: Always write the loader first to load, remember that is not the real load, but the parent delegation mechanism, each loader does not really go to load, but to let the parent loader to load, think about, nature is so, if the father has this thing, I also go in vain a trip load why?

That is, the Xxx.class file, the self-written customclassloader not to load, I first go to see if my parent class loader has loaded this class->appclassloader, I still do not load, Let me ask if my parent class has already loaded this class file.

In this way, constantly upward push, if the last Bootstrapclassloader still did not load the class file, and try to load, the result is not found, will again U-type back, like the interceptor and return, from the bottom loader constantly down to delegate loading.

To be blunt, the most real work is Bootstarpclassloader, and the other ClassLoader only load when the parent class is not found around a circle. That you can't rely on Lao Tzu, but on my own.

ClassLoader What is the stage, compile and run time of class loading in Java? is class loading the same as class loading?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.