ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holliday, Donald B. (LNG-CSP)" <>
Subject No execute attribute on the <jar> task
Date Mon, 09 Feb 2004 22:20:18 GMT
The <javac> task has an "execute" attribute that you can set to tell ant
exactly which java compiler you want to compile your code.  This allows you
to compile the same code against different compilers.

The <jar> task does not have an "execute" attribute.  If I run ant with
j2sdk 1.4.2 it appears that ant will create my jar file using the jar tool
that shipped with 1.4.2.

Seems like an "execute" attribute should be available on the <java> and
<jar> tasks also so that we could keep all of the tools running from a
consistent JDK/SDK.

We still maintain code compiled with JDK 1.2.2.  If I compile the code using
the 1.2.2 compiler, and then jar them up using the 1.4.2 jar tool, am I
guaranteed that JDK 1.2.2 will be able to read the jar file correctly?

The workaround, of course, is to wrap ant in a script that sets JAVA_HOME
before running ant, but that's just more code to write and maintain.


Donald Holliday

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message