Stefan Bodewig wrote: > On Mon, 7 Apr 2003, Ignacio J. Ortega <[EMAIL PROTECTED]> wrote: >> "Stefan Bodewig" <[EMAIL PROTECTED]> escribió en el mensaje > >>> Class.forName will use the system classloader and not the nice >>> little >> >> IMHO This contradicts my experience of CLs, i think some places >> inside tomcat used Class.forName also, and never seen what you >> say.. Class.forName loads in the current loader > > Now, where did I get this misconception? Sorry I have disappointed > you, DD ;-) > > I think what you say is true for Java 1.2+, but not for Java 1.1. The > API docs of Java 1.1 are not clear about this, but a lot of > classloader stuff has changed between 1.1 and 1.2. I'm one of those > poor guys who still have to maintain 1.1 compatibility. > > So for Ant 1.6, this is no issue as long as no core Ant classes > calling Class.forName can also be loaded via the parent.
You are right that Class.forName should be changed. The "right" way is to first try with the thread class loader ( this would allow ant to be used in a webapp for example ). Costin