You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Schmolzi, Christian" <cs...@debis.com> on 2000/08/16 13:13:11 UTC
Compiling with twodifferent jdks?
Hi,
I am working on a buildfile for a project where there's a need to
compile one part with jdk 1.1.7B and the other part with jdk 1.2.2.
The package-structure is as follows:
a/b/c/compilethiswith117b/**/*.java and
a/b/c/compilethiswith122/**.java
Is there an easy way to do this under Unix and Windows?
Ciao,
Christian
Re: Compiling with twodifferent jdks?
Posted by Mariusz Nowostawski <ma...@marni.otago.ac.nz>.
> I am working on a buildfile for a project where there's a need to
> compile one part with jdk 1.1.7B and the other part with jdk 1.2.2.
> The package-structure is as follows:
>
> a/b/c/compilethiswith117b/**/*.java and
> a/b/c/compilethiswith122/**/*.java
>
> Is there an easy way to do this under Unix and Windows?
I believe what you really want is to recompile different packages using
different Java class libraries from Java 1 and Java 2 appropriately.
To achieve that easily with ANT, simply specify a compiler to be jikes,
and use two javac tasks, feeding them with different java runtime
libraries inside the classpath parameter:
$JAVA1_HOME/lib/classes.zip (for the jdk1.1.7 case) and
$JAVA2_HOME/jre/lib/rt.jar (for the jdk1.2.2 case).
Can you tell me why you cannot recompile
a/b/c/compilethiswith117b/**/*.java with jdk1.2.2 ?
Hth
Mariusz