ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject AW: new Launcher and CLASSPATH
Date Thu, 18 Sep 2003 14:12:15 GMT
AntClassLoader has a constructor without arguments, which is called from
Do we want to create a new constructor for AntClassLoader with just the
Project as parameter, so that the class loader can be set there ?


-----Ursprungliche Nachricht-----
Von: Stefan Bodewig []
Gesendet: Donnerstag, 18. September 2003 15:41
Betreff: Re: new Launcher and CLASSPATH

On Thu, 18 Sep 2003, Conor MacNeill <>
> On Wed, 17 Sep 2003 08:29 pm, Stefan Bodewig wrote:

>> (2) Fix all tasks that load classes - like Definer - to delegate to
>> the classloader created in Launcher instead of the system
>> classloader.
> I don't think this will work. No matter which classloader you use to
> find the class, if it is found on the system class loader it will
> try to load dependent classes with the same loader.


Say Launcher wouldn't pass null but its URLClassLoader into Main and
it would end up as being the core loader of Project - it looks as if
it was supposed to be that way anyway, if you trust the comments in
Main and Project except for the one for Main#startAnt 8-)

OK, further on, make project.getCoreLoader the parent in
AntClassLoader if you don't have an explicit parent.

With that we should end up with AntClassLoader delegating to the one
created in Launcher - and if we could get this one to not delegate to
the system loader, we should be there, no?

>> Also, I'm not sure whether build.sysclasspath is going to work as
>> expected when used with the new launcher.  It seems as if the code
>> in Launcher that resets the java.class.path system property should
>> take care of it, but I'm not entirely sure.
> True - may not be compatible with my empty CLASSPATH recommendation
> above.

Yes, build.sysclasspath=only will always include all jars from
ANT_HOME/lib, which have been on the CLASSPATH when using the old
wrapper script anyway.


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

View raw message