Hi Dominique, my custom task did not create a classloader, at least not "consciously". The custom task was defined with <taskdef/>. I simply saw that putting the JNDI driver in the classpath of the taskdef did not work.
Regards, Antoine -------- Original-Nachricht -------- Datum: Tue, 12 Sep 2006 18:57:04 -0500 Von: "Dominique Devienne" <[EMAIL PROTECTED]> An: "Ant Developers List" <dev@ant.apache.org> Betreff: Re: classloader for 1.7 > > I had a problem with a custom task which I had written which was using > JNDI. This task had a runtime dependency on a JNDI driver for MQ Series. > Adding the JNDI driver to the classpath of the taskdef never worked, the only > thing that worked was to start ant with a -lib fullpathtoMQJNDI.jar. I > assumed that the reason is that the JNDI driver is loaded by the JDK runtime, > so only indirectly from my custom task. > > JDK code, loaded by the bootstrap class loader, depends I believe on > the context class loader to locate/load discovered services. I believe > the CL set by Launcher is set as the context loader, which is why it > worked, whereas the CL you created in your custom task wasn't the > context one maybe? I'm just guessing of course. --DD > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]