ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Invoking ant with custom ClassLoader
Date Thu, 17 Jan 2002 14:31:21 GMT
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: <David.Bailey@lawson.com>
To: <ant-user@jakarta.apache.org>
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message