Ant build toolkit for Java 1.4.2?
Hi,
we have to use Java 1.4.2 for our build. However the delivered ant build toolkit is available for 1.5 only.
If I understand correctly this means for us:
- no parallel builds (must have)
- no results publishing (nice to have)
- no current activity logging (nice to have)
Is ant build toolkit also available for Java 1.4.2? At least at the moment we will stop our RTC evaluation :-(
Alexej
we have to use Java 1.4.2 for our build. However the delivered ant build toolkit is available for 1.5 only.
If I understand correctly this means for us:
- no parallel builds (must have)
- no results publishing (nice to have)
- no current activity logging (nice to have)
Is ant build toolkit also available for Java 1.4.2? At least at the moment we will stop our RTC evaluation :-(
Alexej
9 answers
The build tookit as well as many other parts of Jazz use Java 5.0 features
so it's definitely required. There is no 1.4 version available.
Don Weinand
Jazz Team Build
"alexej.penner" <alexej> wrote in message
news:gmek8a$8jp$1@localhost.localdomain...
so it's definitely required. There is no 1.4 version available.
Don Weinand
Jazz Team Build
"alexej.penner" <alexej> wrote in message
news:gmek8a$8jp$1@localhost.localdomain...
Hi,
we have to use Java 1.4.2 for our build. However the delivered ant
build toolkit is available for 1.5 only.
If I understand correctly this means for us:
- no parallel builds (must have)
- no results publishing (must have)
- no current activity logging (nice to have)
Is ant build toolkit also available for Java 1.4.2? At least at the
moment we will stop our RTC evaluation :-(
Alexej
Alexj,
I was wondering if it would be possible for you to use the Java 5 JDK
and just set the source and target versions for the compiler - in fact,
I have worked on several projects where we had code for which some
pieces would run on Java 5 (server) and some pieces would run on Java
1.4.2 (client) and we built using a single version of the Java SDK.
Regards,
David Brauneis
IBM Rational Build Forge Architecture & Development
alexej.penner wrote:
I was wondering if it would be possible for you to use the Java 5 JDK
and just set the source and target versions for the compiler - in fact,
I have worked on several projects where we had code for which some
pieces would run on Java 5 (server) and some pieces would run on Java
1.4.2 (client) and we built using a single version of the Java SDK.
Regards,
David Brauneis
IBM Rational Build Forge Architecture & Development
alexej.penner wrote:
Hi,
we have to use Java 1.4.2 for our build. However the delivered ant
build toolkit is available for 1.5 only.
If I understand correctly this means for us:
- no parallel builds (must have)
- no results publishing (must have)
- no current activity logging (nice to have)
Is ant build toolkit also available for Java 1.4.2? At least at the
moment we will stop our RTC evaluation :-(
Alexej
Hi David,
Unfortunately this will not help us :-(
1. From the technical point of view this doesn't always work.
Try to compile
with 1.5 (target 1.4) and run it on Java 1.4. I think you still need to (or must) use rt.jar from 1.4.
2. The second reason is a legal one: we will lose software producer support, since the framework version we have to use is only supported for Java 1.4.2 :-(
Alexej
Unfortunately this will not help us :-(
1. From the technical point of view this doesn't always work.
Try to compile
CharSequence s = new String("abc");
StringBuffer sb = new StringBuffer();
sb.append(s);
with 1.5 (target 1.4) and run it on Java 1.4. I think you still need to (or must) use rt.jar from 1.4.
2. The second reason is a legal one: we will lose software producer support, since the framework version we have to use is only supported for Java 1.4.2 :-(
Alexej
do you mean just using exec? Yes, that could be a possible solution.
Alexej
sort of. the java and javac ant tasks have built-in properties for specifying an alternate execution virtual machine. i usually reserve the exec task for system scripts since that (in my perception) is a last resort glue/task. :)
ciao!
the java and javac ant tasks have built-in properties for specifying an alternate execution virtual machine.
As I already answered to David (see above) this doesn't always work. Anyway I will try the "exec" way as far as I have some time...
Alexej
david's answer was to use the compatibility directives wherein you just state that the codebase is for a 1.4.x VM but you are still using the 1.5 VM to execute. mine was to use a real 1.4 VM as you fork the execution so that you are still able to use the 1.5 VM for jbe but not for compilation. it would be something like this:
Note: The code tag for the forum is shot so just replace &lt; and &gt; with the less than and greater than symbols to get the XML snippet.
&lt;property name="JDK-1.4" value="C:/jdk/sun1.4.11/"/&gt;
&lt;target name="compile"&gt;
&lt;!-- Up to this point, the Ant is using the default 1.5 VM --&gt;
&lt;javac fork="true" executable="${JDK-1.4}/bin/java.exe"
...&gt;
&lt;!-- make sure the classpath is pointed to the 1.4 VM --&gt;
&lt;/javac &gt;
&lt;/target &gt;
You can read the manual for the Ant Javac task (the second example on top of the Jikes Notes) here. Basically the idea is that everything uses the default JDK but you switch to a different JDK (provider and/or version) when you begin the compilation step.
http://ant.apache.org/manual/CoreTasks/javac.html
ciao!