ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: new Launcher and CLASSPATH
Date Thu, 18 Sep 2003 13:41:13 GMT
On Thu, 18 Sep 2003, Conor MacNeill <conor@cortexebusiness.com.au>
wrote:
> 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.

Sure?

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.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message