Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 40284 invoked from network); 16 Nov 2001 14:43:17 -0000 Received: from unknown (HELO mail.covalent.net) (64.84.39.162) by daedalus.apache.org with SMTP; 16 Nov 2001 14:43:17 -0000 Received: (qmail 21513 invoked from network); 16 Nov 2001 14:43:19 -0000 Received: from host-131-49-18-192.iplanet.com (HELO nagoya.betaversion.org) (192.18.49.131) by mail.covalent.net with SMTP; 16 Nov 2001 14:43:19 -0000 Received: (qmail 28557 invoked by uid 97); 16 Nov 2001 14:42:38 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 28541 invoked by uid 97); 16 Nov 2001 14:42:37 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 28530 invoked from network); 16 Nov 2001 14:42:37 -0000 Message-Id: <200111161442.fAGEgZJ13844@mail008.syd.optusnet.com.au> Content-Type: text/plain; charset="utf-8" From: Peter Donald To: "Ant Users List" Subject: Re: class.forName() Date: Sat, 17 Nov 2001 01:39:41 +1100 X-Mailer: KMail [version 1.3.1] References: In-Reply-To: X-Wisdom-Cookie: . MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Sat, 17 Nov 2001 01:16, Michael Remme wrote: > in ant 1.4 i have the problem, that the Class.forName() is throwing an > exception. I saw in the archive, that there was a similar request, but did > not find any reply. > > Here the problem is residing in an own taskdef, where i want to instantiate > a class by calling Class.forName( xxxx ), which is always throwing a > ClassNotFoundException. If i am instantiating the needed class directly, it > is found. The class you are looking up should be in the same classloader or a parent classloader of your task. So if your task is loaded from ant/lib then the other class must also be in ant/lib etc. Does that help any? If not you will need to give more details. -- Cheers, Pete --------------------------------- I think not; therefore I ain't... --------------------------------- -- To unsubscribe, e-mail: For additional commands, e-mail: