Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 34718 invoked from network); 17 Jan 2002 14:43:32 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 17 Jan 2002 14:43:32 -0000 Received: (qmail 3416 invoked by uid 97); 17 Jan 2002 14:43:08 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 3400 invoked by uid 97); 17 Jan 2002 14:43:07 -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 3386 invoked from network); 17 Jan 2002 14:43:07 -0000 Subject: Re: Invoking ant with custom ClassLoader To: "Ant Users List" X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 Message-ID: From: David.Bailey@lawson.com Date: Thu, 17 Jan 2002 08:41:05 -0600 X-MIMETrack: Serialize by Router on SMTP/Lawson(Release 5.0.8 |June 18, 2001) at 01/17/2002 08:42:42 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Absolutely. In fact, we already do something similar to that for command-line and batch-style builds. But now I'm working on integrating ANT into an IDE (NetBeans, specifically), and so I want/need a 100% java solution. Of course, NetBeans already has ANT integration, but it uses whichever version of ANT that comes with the IDE. The goal is to allow the user to develop in all environments without having to load multiple instances of NetBeans or something equally klunky. So I need to make the NetBeans ANT integration configurable per environment, hence the ClassLoader issue I'm trying to resolve now. --dave "Erik Hatcher" tions.com> cc: Subject: Re: Invoking ant with custom ClassLoader 01/17/2002 08:31 AM Please respond to "Ant Users List" Wouldn't it be easier to make your "gateway" be a batch or shell script and invoke the desired version of Ant using its standard launching script? ----- Original Message ----- From: To: Sent: Thursday, January 17, 2002 9:09 AM Subject: Invoking ant with custom ClassLoader > > We have multiple development environments, each running a different release > level of the ANT engine. > > I am trying to write a single "gateway" interface which will read info from > a .properties file, determine the correct ANT release level for the build, > and fire it off. I therefore need to launch ANT using a custom > ClassLoader. > > The problem is, my custom ClassLoader cannot load > org.apache.tools.ant.Project. I get a java.lang.ClassFormatError and a > message about "Illegal constant pool type". > > I'm attaching a test program. Compile it in some working directory, > and drop a copy of ant.jar into that directory (I used ant 1.4). Then > do the following: > > 1) 'set CLASSPATH=.;ant.jar' > 2) 'java Test2' > > No error. But > > 3) 'set CLASSPATH=.' > 4) 'java Test2' > > and you'll see the error. I'm running on Windows 2000. I > encounter this problem both with jdk1.3.1 and jdk1.3.1_01. > > Any insights would be greatly appreciated. > > Thanks! > > --dave > > (See attached file: Test2.java) ---------------------------------------------------------------------------- ---- > -- > To unsubscribe, e-mail: > For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: