Greetings. Thank you for the answer. I found this section that explains what you are stating: http://ant.apache.org/faq.html#delegating-classloader-1.6
Now the question is: how can I access the instance of AntClassLoader being used by ant and which contains all the -lib entries? I searched the web but could not find any recipe. Any help is appreciated. Thanks for your quick and insightful response. Hans Deragon -- Consultant en informatique/Software Consultant Deragon Informatique inc. http://www.deragon.biz Open source (contribution): mailto://h...@deragon.biz http://autopoweroff.sourceforge.net > On 2009-08-25, Hans Deragon <h...@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-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org