This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: null ClassLoader
- From: "Raif S. Naffah" <raif at fl dot net dot au>
- To: Torsten Rüger <torsten dot rueger at firsthop dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 20 Dec 2001 19:35:21 +1100
- Subject: Re: null ClassLoader
- References: <Pine.LNX.4.10.10111280033000.9325-100000@mars.deadcafe.org><87zo4epw15.fsf@creche.redhat.com>
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