ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr. <ge...@optonline.net>
Subject Baffled in classloader land
Date Fri, 31 Oct 2003 11:36:43 GMT
I'm having a small classloader related problem.  It's pretty simple.

I have an ant task that does

ClassLoader classLoader = this.getClass().getClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(sources[i]);

to get something.  It works fine.

When I switch to

ClassLoader classLoader = 
Thread.currentThread().getContextClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(sources[i]);

it doesn't, everything else the same.

Why?

Or, what am I doing wrong?  I'm using ant version 1.4.1

Any help greatly appreciated.

geir

-- 
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