On Sat, 17 Nov 2001, Michael Remme <[EMAIL PROTECTED]> wrote: > the taskdef, where i am having the problem is quite complex and is > using several own libs.
The most common reason for classloader problems with taskdefs is that the task implementing class itself can be loaded from the system classloader while the support libraries can not. People who want to do "smart" things with <junit> or <style> (i.e. don't put JUnit or Xalan into the CLASSPATH) face this all the time. Ant's classloader is a "good" classloader in that it behaves the way Sun tells us to write classloaders - it asks its parent loader (the system loader in the most common case) first to load a class. Everything you have in your CLASSPATH or in ANT_HOME/lib will end up in your system classloader when you run Ant. If your task implementation can be loaded via this classloader, it *will* be loaded via this classloader, no matter what. If this task now needs a class from a library that is not in your classpath, it won't find it (as the classloader used to load your task doesn't know about these libraries). >> > D-41061 Mönchengladbach >> >> Funny, we are almost neighbors. > > Where are you from? I live in Mönchengladbach and work in Cologne, but we better take this off-list 8-) Stefan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>