This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

about ClassLoaders


I notice that if you try and redefine a class with a ClassLoader, Java 
throws an error, but if you
create a new ClassLoader, Java will let  the new ClassLoader recreate 
the Class. Has anybody
got any insights about why this should be so?

Also, I see that if you declare a Foo class in your code, and then 
manually load a Foo class with
a custom ClassLoader, Java won't  recognise them as being the same 
class. Assuming that no
Foo class has previously been  loaded before you manually load one, I 
wonder why Java makes
the assumption that they are different classes. It kind of creates an 
inpenetratable wall between
classes loaded by the bootstrap ClassLoader and any custom ClassLoader. 
Well, not quite
inpenetratable, but semi. Has anybody got any insights about these murky 
matters? The java doco
is pretty vague about these issues. Is this something fundamental about 
the Java security design
perhaps?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]