ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Self written ant task does not get the CLASSPATH passed to ant with -lib option
Date Wed, 26 Aug 2009 03:46:50 GMT
On 2009-08-25, Hans Deragon <hans@deragon.biz> wrote:

> Why the paths passed to ant with -lib are not found in the CLASSPATH?

Because -lib doesn't work that way 8-)

Ant's launcher constructs a new classloader containing the stuff from
-lib and loads Ant's Main class using that classloader.

> How can I fix this?

If it must be the system classloader that you use, use CLASSPATH
directly.  Most likely you could use the classloader that loaded your
task instead of the system classloader, though.  This one should contain
all your -lib parts.

Stefan

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


Mime
View raw message