You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Carmel, Ron" <RC...@ea.com> on 2002/08/21 01:49:47 UTC

cross compilation from 1.4 to 1.1

i'm running ant1.5 with jdk1.4 and would like to cross compile for a 1.1 JVM.

this is a two part question:

1. i tried using -compiler="classic" in my javac call, but ant says the 1.4 JDK doesn't support the classic compiler:
(from org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory)
if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4)) {
  isClassicCompilerSupported = false;
}
why is this here?  both the modern and classic compiler classes exist in the 1.4 tools.jar.

2. i also tried to write my own CompilerAdapter (javac11adapter), which extends DefaultCompilerAdapter and specify that class name as the value for the compiler attribute of java.  works great on windows, but fails with the following error on solaris:
    [javac] javac was not found in /usr/local/jdk1.4.0/bin/sparc/green_threads/javac
i do not log this message anywhere in my code.
also of relevance, the command line that my adapter tries to execute is as follows:
    [javac] javac command line:  /usr/local/jdk1.1.6/bin/javac -nowarn -d /home/rcarmel/working.dir/build/applets/com/dodo/game/client/backgammon/clear -classpath /home/rcarmel/working.dir/build/applets/com/dodo/game/client/backgammon/clear:/vobs/ben:/usr/local/jdk1.1.6/lib/classes.zip /vobs/ben/com/dodo/util/thin/Log.java

i also tried commenting out the check in part 1 (isClassicCompilerSupported) and replace the original class with the hacked version.  that also works on windows, but fails on solaris with the same "javac was not found in..." error.

please help.

ron

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: cross compilation from 1.4 to 1.1

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 20 Aug 2002, Ron Carmel <RC...@ea.com> wrote:

> both the modern and classic compiler classes exist in the 1.4
> tools.jar.

Not true (at least not on the platforms I have access to - Linux and
Solaris in particular).  It may be there on your Windows box, but not
on the Solaris machin, which may explain the things you've seen.
Better take it as given, that 1.4 has no "classic" compiler.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>