ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: Ant Classloader - Context Classloader
Date Mon, 23 Jul 2001 00:03:36 GMT

> -----Original Message-----
> What I don't understand is why the Ant classloader is not the
> context classloader as well.

Context classloaders are not part of JDK 1.1 so I had not set it until
recently. In a recent change, I have set the context classloader for <java>
tasks by reflection. I haven't however, extended that to taskdefs. Hmmm, we
could do that just prior to execute, I guess, assuming the context loader is
not required for task configuration.

> Although I have my application server classes
> in the nested classpath element, I have to set the context classloader
> manually by calling
> Thread.currentThread().setContextClassLoader(this.getClass().getCl
> assLoader(
> ));
> before I create the InitialContext within foo.
> I did not find anything about this point in the mail-archive and I'm
> wondering if this is an intended behaviour. It would be nice if someone
> could put some light onto this.

There was a bug report about this, in relation to <java> tasks.

View raw message