ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Baffled in classloader land
Date Fri, 31 Oct 2003 15:13:38 GMT
On Fri, 31 Oct 2003, Geir Magnusson, Jr. <> wrote:

> i.e. the primorial app classloader, as ant didn't set a context
> classloader for the thread, so we walk up the thread 'tree' to find
> one.

I've just checked, Ant 1.6 will set the context classloader to the one
that has loaded Ant in the new Launcher code.  Ant 1.5.x did not.

> Is there a way I can change my ant task to fix this?

If you know that the context classloader is no good (because it is
instanceof sun.misc.Launcher$AppClassLoader) you could fall back to
getClass().getClassloader() instead.

Sorry, I don't see a magical fix (apart from giving 1.6beta a decent
test run, hint ;-).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message