ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinar Bicioglu <>
Subject RE: Using JDKs with jar files
Date Wed, 18 Apr 2001 14:53:23 GMT

-----Original Message-----
From: Diane Holt []
Sent: Monday, April 16, 2001 12:17 PM
Subject: Re: Using JDKs with jar files

--- wrote:
> The only way I know of to accomplish this would be to use two separate
> build files instead of two separate targets.  It would be nice to be
> able to specify the JDK to use (overriding the project attribute) for a
> specific java command like (java, javac, etc.).

For the <java> task, you can specify the "jvm" attribute with the
full-path of the 'java' executable in order to use a different one from
what you're running Ant with (you need to also specify fork="yes"). For
the <javac> task, you should be able to turn off the inclusion of the
system and Ant classes and just specify the classes you want to use for
the JDK you want to compile against.

Please correct me if I am wrong. in the <javac> task I can only use
supported versions of JDKs right? such as 1.1, 1.3 ... However I'd like to
compile one of my targets in build.xml file woth JDK 1.1.8 ? is this one of
the versions that <javac> task supports? because I read in the Ant user's
manual that if I want to use a different compiler interface than jdk1.1, 1.2
or 1.3 or jikes , I need to write a class that implements the
CompilerAdapter interface


View raw message