Search This Blog

ANT: set target jvm in the build.xml file by adding source and target options to the javac task

According to https://ant.apache.org/manual/Tasks/javac.html
 <!-- -->
 <!--Target: compile-->
 <!-- -->
 <target name="compile" depends="init,clean" description="Compile the java source">
  <!-- Compile the java code from ${src} into ${build} -->
  <javac debug="on" debuglevel="lines,vars,source" srcdir="${src}" destdir="${build}" source="1.6" target="1.6">
   <classpath>
    <pathelement location="${commons-jar}" />
   </classpath>
  </javac>
 </target> 

see also

No comments:

Post a Comment