This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
about ClassLoaders
- To: kawa at sourceware dot cygnus dot com
- Subject: about ClassLoaders
- From: Chris <chris at tech dot com dot au>
- Date: Wed, 11 Apr 2001 18:58:42 +1000
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?