For error, check image
I am attaching the compile code of my build.xml
<target name="compile" depends="init, clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${test.dest}" includes="**/*"/>
</delete>
<echo message="making directory..."/>
<mkdir dir="${test.dest}"/>
<echo message="classpath----: ${test.classpath}"/>
<echo message="Compiling.."/>
<javac includeantruntime="false" debug="true" destdir="${test.dest}" srcdir="${test.src}" target="12.0.1" classpath="${test.classpath}">
</javac>
</target>
You should only specify the Java specification version (or major version) in target of the javac
task. So, instead of target="12.0.1"
, it should be target="12"
.