Ok, I think I've found my problem. The fact is the system classloader is never updated, but the context classloader is. So, all I have to do is to substitute any instance of
ClassLoader cl = ClassLoader.getSystemClassLoader(); with ClassLoader cl = Thread.currentThread().getContextClassLoader(); The context class loader seems to actually honor -lib and $CLASSPATH On Wed, Mar 27, 2013 at 9:07 AM, Edoardo Vacchi <uncommonnonse...@gmail.com> wrote: > On Tue, Mar 26, 2013 at 11:43 PM, Rainer Noack <rai...@noacks.net> wrote: > >> if you're launching ant via shell script, it is using >> oata.launcher.Launcher.java >> >> This class reorganises the classpath a bit. > > [...] > > Hi Rainer, > then how can I pass to the new ClassLoader a custom classpath? (which > is in fact the path(s) to the jar(s) that contains the taskdef'd > task?) > > e.v. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org