You'll find if you ShowSomeEffort(⇐click) and SearchFirst,(⇐click) you'll have a much more productive experience here. Note that this site is more geared toward answering specific, targeted questions than to providing overviews of broad topics.
I disagree with Winston. While classloaders can generally be ignored for desktop apps, understanding them is important for servlet containers and app servers. What's more, classloader based technologies like OSGi can be very powerful tools for all apps, even on the desktop.
Ulf Dittmer wrote:I disagree with Winston. While classloaders can generally be ignored for desktop apps, understanding them is important for servlet containers and app servers. What's more, classloader based technologies like OSGi can be very powerful tools for all apps, even on the desktop.
OK, I should probably have said "don't worry about it yet" (consider the source forum). If and when you need to use them, you will hopefully be furnished with proper instructions, but for a beginner I suspect it's just information overload.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I have read different topics about Class Loaders in Java. Now, I have following queries. Please help in me resolving these queries:
i. The class loaders are in following hierarchy Bootstrap > Extensions > System. Now, Extensions class loader loads the jars from jre/lib/ext folder. But, why there is a separate class loader specifically for these jars?
ii. As per the topcis, the Bootstrap Loader loads the java.lang.*, java.util.* package classes. But, when I wrote the following piece of code, it is printing NULL. Why the class loader is coming as NULL here. It should have printed the Bootstrap Class Loader name here. Am I missing something over here?
I have read a lot about the CLass Loaders and found this. When a class loader is entrusted with the responsibility of loading a class, as a first step it delegates this work to the associated parent class loader. Then this parent class loader gets the instruction and sequentially it delegates the call to its parent class loader. In this chain of hierarchy the bootstrap class loader is at the top.
Can anyone please explain what is the use of delegation model here in loading the classes when everything will be loaded by BootStrap loader only?