ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: AW: AW: AW: two diff't JDKs
Date Tue, 28 Oct 2003 12:27:08 GMT

--- Antoine_Levy-Lambert <> wrote:
> Hi Erik,
> I think that you need to use both the compiler !!!and!!! the
> executable
> attributes of <javac> in order to be able to compile properly with
> javac
> 1.1.
> The problem that you are experiencing is that ant is sending command
> line
> arguments to javac 1.1 in the 1.2 format which javac 1.1 does not
> understand.
> So do <javac executable="c:/jdk1.1/bin/javac.exe" compiler="classic"
> ...>
> and it should work fine for you.
> The executable attribute tells ant where physically the compiler
> lives.
> The compiler attribute tells ant how to talk to the compiler.

Antoine, that makes a lot of sense, since I do suspect that the 1.1
compiler is not being called correctly.  However, there is a problem --
apparently if you set fork="yes", it ignores the value of the
"compiler" attribute.  When I try it, I get a log message saying so,
and the same problem occurs.

So I tried removing the "fork" attribute (even though that doesn't make
sense since we need to fork in order to use an external compiler) just
in case there might have been a problem in the documentation/log
message.  Sure enough, it appears that the
DefaultCompilerAdapter.executeExternalCompile() method never gets

This leads me to the following conclusions:

1. In order to use the 1.1 compiler, "fork" must be set to "yes" and
"compiler" must be set to "classic".
2. Setting "compiler" to "classic" is ignored if the "fork" attribute
is set to "yes".
3. Setting the fork attribute to "no" doesn't call the external
compiler (at least, it doesn't seem to call executeExternalCompile()
from DefaultCompilerAdapter, according to my experimentation with the
1.5.4 source).

It seems that this problem is a bug, and would not exist if setting
"fork" to "yes" did not cause the "compiler" attribute to be ignored. 
Do you know why it is ignored?

Thanks for your help!


Copyright.  Copy right.
The right to copy.  That's all it is.
Contrary to popular belief, there's no such thing as intellectual "property".

Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

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

View raw message