Hi Erik,

I did not look at this bit of code, but I am confident that generally you
can run javac with fork="true" and use the executable that you have set
as attribute of the javac task (for instance have ant run under 1.4 VM and
compile with the 1.3 compiler).

Can you try fork="true" compiler="javac1.1" executable="path/to/your/1.1exe"
this might work

I had this idea when looking at this piece of code :

    protected boolean assumeJava11() {
        return "javac1.1".equals(attributes.getCompilerVersion())
            || ("classic".equals(attributes.getCompilerVersion())
                && JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1))
            || ("extJavac".equals(attributes.getCompilerVersion())
                && JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1));
    }

Cheers,
Antone

-----Ursprungliche Nachricht-----
Von: Erik Price [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 29. Oktober 2003 16:43
An: Ant Users List
Betreff: Re: compiling Java 1.1 projects [was: two diff't JDKs]



--- Antoine_Levy-Lambert <[EMAIL PROTECTED]> wrote:
> Hi Erik,
>
> you are absolutely right. If fork="no" and compiler="classic", then
> the
> compiler of the current runtime will be called with 1-1 style
> switches.
>
> So something must be done to the code so that the 1-1 compiler can be
> called
> with fork="true" and a current runtime java >= 1.2



I'm not sure that I understand the logic behind this:  In
Javac.compile(), the CompilerAdapterFactory returns the appropriate
type of CompilerAdapter to use for the current script, which makes
sense.  In my case, it returns a JavacExternal because I have specified
fork="true".  However, in line 78 of JavacExternal.java (in Ant 1.5.4
source code), the JavacExternal then determines the executable to use
by querying getJavacExecutable(), which is in JavacExternal's
superclass Javac.  Then, this method returns the system Javac if
fork="true".

So it seems that what needs to be fixed [first] is
Javac.getJavacExecutable(), unless I'm misreading this somehow.


Erik

=====
--
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
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to