ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Classloading and CompilerAdapter problem
Date Wed, 08 Jul 2009 14:41:42 GMT
On 2009-07-08, Hans Lund <> wrote:

> I'm not sure if this is a bug, or just works as it should:

depends on who you ask 8-)

seems to think we should use the task's classloader instead of the
context classloader.

>      Class.forName('') is the same as
>      CompilerAdapterFactory.class.getClassLoader().loadClass('')

> both will fail or both will succeed.

Yes, it is - on paper (or in Javadocs).  I vaguely recall problems
with some oldish IBM implementations (or Kaffee or ...) where the code
made a difference, but this is probably water under the bridge by now.

One should never forget that much if not the majority of Ant has been
written for Java 1.1 and contains workarounds for the immature VM
implementations available at that time.  The code in question has been
added almost seven years ago
<> but I don't
recall the context.

> but why not use the Thread.currentThread.getContextClassLoader()
> That would lead to the most flexible solution.

see above, implementing issue 11143 would probably be even more


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

View raw message