Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 2232 invoked from network); 21 Feb 2002 11:20:01 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Feb 2002 11:20:01 -0000 Received: (qmail 3753 invoked by uid 97); 21 Feb 2002 11:19:27 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 3678 invoked by uid 97); 21 Feb 2002 11:19:26 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 3618 invoked by uid 50); 21 Feb 2002 11:19:26 -0000 Date: 21 Feb 2002 11:19:26 -0000 Message-ID: <20020221111926.3617.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: DO NOT REPLY [Bug 6606] - META-BUG problems with delegating classloaders X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6606 META-BUG problems with delegating classloaders ------- Additional Comments From bodewig@apache.org 2002-02-21 11:19 ------- OK, first of all let's state that Ant adds all .jar files from ANT_HOME/lib to CLASSPATH, therefore when I say "in CLASSPATH" in the rest, it means "either in your CLASSPATH environment or ANT_HOME/lib". This bug collects a common type of problem: A task needs an external library and it has a nested classpath element so that you can point it to this external library, but that doesn't work unless you put the external library into the CLASSPATH. The root of the problem is that the class that needs the external library is on the CLASSPATH. When you specify a nested in Ant, Ant creates a new class loader that uses the path you have specified. It then tries to load additional classes from this classloader. In most cases - for example the two cases above - Ant doesn't load the external library directly, it is the loaded class that does so. In the case of it is the task implementation itself and in the case of