null ClassLoader

Raif S. Naffah raif@fl.net.au
Thu Dec 20 00:33:00 GMT 2001


At 09:05 AM 12/20/01 +0200, Torsten Rüger wrote:
>Tom Tromey wrote:
>>>One simple fix would be to simply always set the loader field when
>>registering a class. The reality is that all classes in shared
>>libraries which are linked into the application *are* loaded by our
>>"bootstrap" loader.
>>>That sounds good...

excuse the intrusion but, at the risk of stating the obvious, i just want 
to attract people (who are working on this)'s attention to the fact that 
classloaders are also used to partition the name space. for example i 
might write an application that loads a class with the same name, but with 
different behaviour, from two different jars, each with a distinct 
classloader. i should then be able to get two distinct instances of the 
same class.
if as it sounds to me, all classes are loaded by the same classloader, and 
in the example above, the second class instance (supposedly from the second 
jar) will not get loaded/created which is contrary to the semantics of the 
classloader.
cheers;
rsn


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /