ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@optonline.net>
Subject Re: Baffled in classloader land
Date Fri, 31 Oct 2003 12:44:19 GMT

On Friday, October 31, 2003, at 07:37 AM, Geir Magnusson Jr. wrote:

>
> On Friday, October 31, 2003, at 06:47 AM, Stefan Bodewig wrote:
>
>> On Fri, 31 Oct 2003, Geir Magnusson, Jr. <geirm@optonline.net> wrote:
>>
>>> When I switch to
>>>
>>> ClassLoader classLoader =
>>> Thread.currentThread().getContextClassLoader();
>>
>>> it doesn't, everything else the same.
>>
>> So it's a different classloader than the one that has loaded your
>> class.  Why do you expect it to be the same?
>
> I thought this was the safe way to do things.
>
> I'm clearly no expert, but here's my take : I get the context 
> classloader, and either it's one you placed there for me to use (and 
> thus should allow me to get resources) and that should do the resource 
> search up the classloader tree, right?  If not, this should be 
> documented, and an example on how to get things into the classpath of 
> the context classloader.
>
> Hasn't this caused problems for others?
>
>>
>>> I'm using ant version 1.4.1
>>
>> This is quite old (1.5.4 is the latest stable release, 1.5 has been
>> released more than a year ago).  You could try to see whether you get
>> a different result with the 1.6 beta - we have changed quite a few
>> things to classloading.
>

Didn't work with 1.5.4. Hm

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message