Re: how to set JAVA_HOME in antscript build.xml
Matt Pangaro <
mattp@...>
2008-07-02 11:50:39 GMT
Note for everyone. Use source and target carefully and test thoroughly.
We used to do this with the 1.5 compiler, and you would end up with code
that would not execute on a 1.4 JVM, but you wouldn't find out until
execution time of that particular code. In this case, 1.5 would build
some String operations using methods that were @since 1.5. It was
reported but Sun's official position on it was that there wasn't a bug,
or that they weren't going to fix it, since there was a workaround (use
1.4 compiler).
Jim Hague wrote:
> On Tuesday 01 July 2008 21:51:43 Naina Dani wrote:
>> I do not know how to stub out main ant script calling the real script
>> through the exec task. Could you please elaborate this further.
>
> We're running Anthill OS under JDK 1.6, and using the JDK 1.6 compiler to
> build a project targetted at the 1.4 JVM. In the relevant build.xml we have:
>
> <property name="waldo.java.source.version" value="1.4"/>
> <property name="waldo.java.target.version" value="1.4"/>
>
> <javac destdir="${build}" classpathref="libs.path"
> debug="${debug}" optimize="${optimize}" deprecation="on"
> source="${waldo.java.source.version}"
> target="${waldo.java.target.version}">
> <src refid="src.path"/>
> </javac>
>
> (Waldo is the internal project name).