Class loading is done (almost always) parent first. So basically if the Ant Task is up high in the classloader hierarchy (such as in the ant lib directory) then every class it needs would need to be at the same level or above (such as CLASSPATH environment variable or the JDK extensions). The dependent classes wont be found if they are lower (such as in a taskdef classloader). So either move the dependant files up, or the task itself down.
Ben -----Original Message----- From: Ralf Sigmund [mailto:[EMAIL PROTECTED] Sent: Friday, June 30, 2006 6:54 AM To: user@ant.apache.org Subject: how can I use classpath from taskdef in task excecution hello, i wrote a custom ant task which depends on several jars. a complete classpath is given to the taskdef. however when i use the task in a target I get Class not found errors. It all works when I start ant itself with the complete classpath. but this is not what I want - I would like to execute my task with the same classpath / classloader that I defined for the taskdef. Thanks Ralf ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]