On Mon, 13 Oct 2008, Jeremy Mawson <[EMAIL PROTECTED]> wrote: > I have a custom task defined thus: > > <taskdef resource="task.properties" classpathref="task.class.path"/> > > The classpathref contains the jar which includes both my Task and a > file resource. When I try to obtain the resource in the Task at > runtime I'm unable to find it.
You should be able to load it with MyTask.class.getResource(). > When I print out the java.class.path property in the task, it does > not include the jar my Task is in! This property only reflect what the system classloader sees. Your task has been loaded by a different classloader that has your custom jars in it as well. You can get this ClassLoader via MyTask.class.getClassLoader(). Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]