title: Ant build failed: srcdir does not exist
body: <p>I am very new to Apache Ant and I have the following problem when I run the ant command:
  BUILD FAILED</p>
  
  <pre><code>C:\testANT\build.xml:17: srcdir "C:\testANT\src" does not exist!
          at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:925)
          at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchU
          at org.apache.tools.ant.Task.perform(Task.java:348)
          at org.apache.tools.ant.Target.execute(Target.java:435)
          at org.apache.tools.ant.Target.performTasks(Target.java:456)
          at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
          at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
          at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
          at org.apache.tools.ant.Project.executeTargets(Project.java:1260
          at org.apache.tools.ant.Main.runBuild(Main.java:853)
          at org.apache.tools.ant.Main.startAnt(Main.java:235)
          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
  </code></pre>
  
  <p>My build.xml file is:</p>
  
  <hr>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;project name="JarBuild" basedir="." default="jarfile"&gt;
  &lt;target name="init" description="Initializes properties"&gt;
      &lt;property name="project.name" value="helloWorld"/&gt;
      &lt;property name="src.dir" value="src"/&gt;
      &lt;property name="build.dir" value="build"/&gt;
      &lt;property name="classes.dir" value="${build.dir}/classes"/&gt;
      &lt;property name="etc.dir" value="etc"/&gt;
  &lt;/target&gt;
  &lt;target name="prepare" description="Creates the build and classes directories" depends="init"&gt;
      &lt;mkdir dir="${classes.dir}"/&gt;
  &lt;/target&gt;
  &lt;target name="compile" description="Compiles the code" depends="prepare"&gt;
  &lt;javac srcdir="${src.dir}" destdir="${classes.dir}" /&gt;
  &lt;/target&gt;
  &lt;target name="jarfile" description="JARs the code" depends="compile"&gt;
  &lt;jar destfile="${build.dir}/${project.name}.jar"
  basedir="${classes.dir}"
  manifest="${etc.dir}/MANIFEST.MF" /&gt;
  &lt;/target&gt;
  &lt;target name="clean" description="delete the build directory" depends="init"&gt;
  &lt;delete dir="${build.dir}}" /&gt;
  &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <hr>
  
  <p>I mention that the build.xml file is in the main folder. 
  Thanks a lot!
  Regards!</p>