ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmel, Ron" <RCar...@ea.com>
Subject cross compilation from 1.4 to 1.1
Date Tue, 20 Aug 2002 23:49:47 GMT
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:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message