Internals of Java Class Loading
By cbeckham on Feb 01, 2005
A.class is not A.class, when each is loaded by a different class loader. That's only the beginning of the trickiness unveiled by Binildas Christudas in his article Internals of Java Class Loading, in which he shows how multiple class loaders relate to one another, the consequences (and yet necessity) of loading classes from multiple class loaders, and why you might even want to write your own. He says, "all Java programmers should know how the mechanism works and what can be done with it to suit their needs. This can save time that would otherwise have been spent debugging ClassNotFoundException, ClassCastException, etc."
This is a very good post on Java.net that gives a good overview of the internals of Java class loading.