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?