ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Henssen <>
Subject Problems with different javac s in the same build.xml
Date Wed, 15 Aug 2001 10:36:34 GMT
Hi everybody,

I´m having a problem with different javac s in the same build.xml:

My setup is as follows:

- I´m building two applets with JNI / J/Direct support for Netscape / IE.
- When using J/Direct, one has to use M$´s jvc (don´t tell me about
standards, please - I know :-)).
- For the other part of the applet (the Netscape classes), I need to use a
std. JDK javac (with JNI support).

So in my build.xml I try to do this by setting ${build.compiler} just before

	<target name="netscapeCompile" depends="init">
		<property name="build.compiler"  value="classic"/>
		<javac srcdir="${src}" destdir="${}" 
				<pathelement path="${java.class.path}/"/>
				<pathelement location="${nssec.jar}"/>

	<target name="msieCompile" depends="init">
		<property name="build.compiler"  value="microsoft"/>

Nevertheless it always uses the same compiler when I use both targets in the
same antrun (depending on the order of my targets - when msieCompile is
triggered first, only jvc is used, when netscapeCompile is triggered first, only
javac is used).

- Is there maybe a problem with some sort of "caching" of the
"build.compiler" property ?
- Are different compilers in the same build.xml during one antrun supported
- Does it help to put the targets in separate files and call them through
<ant> ?
- Or am I just using the commands a wrong way ?

All comments are welcome.

Lars Henssen

View raw message