java - Change JDK for running <ANT> task from within build xml -


i have build.xml calls swfbuild.xml. want parent build.xml use ibm jdk 1.5 , swfbuild.xml use sun jdk 1.6

is there option in <ant> task specify different jdk use?

i tried setting javacmd below doesn't work either

how can use different jdk swfbuild.xml?

    <target name="compile_swf">         <exec executable="cmd">             <env key="javacmd" value="c:/program files/java/jdk1.6.0_18" />         </exec>         <echo message="start compile swf content" />         <ant antfile="swfbuild.xml" target="swf-masterbuild" />         <exec executable="cmd">             <env key="javacmd" value="c:/ibm/sdp/runtimes/base_v61/java" />         </exec>     </target> 

in each xml file, can specify executable use inside javac task. must include fork=yes in addition executable= parameter.

<javac fork="yes" executable="c:/program files/java/jdk1.7.0_17/bin/javac"> 

Comments