title: Java ant build failed because class not found
body: <p>I am learning Java ant. I created a project in eclipse call hello world. And then i did a export on the project and created a ant build file. When i run the ant file it fails complains about: <strong>BUILD FAILED
  C:\Users**</strong>\workspace\HelloWorld\build.xml:31: Class not found: javac1.8</p>
  
  <p>and point to this line: </p>
  
  <pre><code>&lt;javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}"&gt;
  </code></pre>
  
  <p>I am using eclipse kepler.</p>
  
  <p>Here is my build.xml file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!-- WARNING: Eclipse auto-generated file.
                Any modifications will be overwritten.
                To include a user specific buildfile here, simply create one in the same
                directory with the processing instruction &lt;?eclipse.ant.import?&gt;
                as the first entry and export the buildfile again. --&gt;
  &lt;project basedir="." default="build" name="HelloWorld"&gt;
      &lt;property environment="env"/&gt;
      &lt;property name="debuglevel" value="source,lines,vars"/&gt;
      &lt;property name="target" value="1.2"/&gt;
      &lt;property name="source" value="1.3"/&gt;
      &lt;path id="HelloWorld.classpath"&gt;
          &lt;pathelement location="bin"/&gt;
      &lt;/path&gt;
      &lt;target name="init"&gt;
          &lt;mkdir dir="bin"/&gt;
          &lt;copy includeemptydirs="false" todir="bin"&gt;
              &lt;fileset dir="src"&gt;
                  &lt;exclude name="**/*.java"/&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
      &lt;/target&gt;
      &lt;target name="clean"&gt;
          &lt;delete dir="bin"/&gt;
      &lt;/target&gt;
      &lt;target depends="clean" name="cleanall"/&gt;
      &lt;target depends="build-subprojects,build-project" name="build"/&gt;
      &lt;target name="build-subprojects"/&gt;
      &lt;target depends="init" name="build-project"&gt;
          &lt;echo message="${ant.project.name}: ${ant.file}"/&gt;
          &lt;javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}"&gt;
              &lt;src path="src"/&gt;
              &lt;classpath refid="HelloWorld.classpath"/&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
      &lt;target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/&gt;
      &lt;target name="HelloWorld"&gt;
          &lt;java classname="HelloWorld" failonerror="true" fork="yes"&gt;
              &lt;classpath refid="HelloWorld.classpath"/&gt;
          &lt;/java&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Does anyone know why this is happening? </p>