title: ant build gives package does not exist error
body: <p>I am using ant build function on linux to compile a java program. I have three java files and I'm trying to import them to my main.java file but I get an error saying</p>
  
  <pre><code>/home/ggaz1/Ser321/Assigns/Assign2/src/main.java:4 error: package Assign2.src does not exist 
  </code></pre>
  
  <p>here is the build.xml file. the path to it is </p>
  
  <pre><code>/home/ggaz1/Ser321/Assigns/Assign2
  
  &lt;?xml version="1.0"?&gt;
  &lt;project name="Movie Library."
           default="targets" basedir="."
           xmlns:dn="antlib:org.apache.ant.dotnet"
           xmlns="antlib:org.apache.tools.ant"
           xmlns:cpptasks="antlib:net.sf.antcontrib.cpptasks"&gt;
  
     &lt;property name="src.dir" value="src"/&gt;
     &lt;property name="build" value="classes"/&gt;
     &lt;property environment="env"/&gt;
     &lt;property name="user" value="${env.USERNAME}"/&gt;
  
     &lt;target name="targets"&gt;
        &lt;echo message="Targets are clean, prepare, build, execute, and targets"/&gt;
     &lt;/target&gt;
  
     &lt;path id="compile.classpath"&gt;
        &lt;pathelement location="${build}"/&gt;
     &lt;/path&gt;
  
     &lt;target name="prepare"&gt;
        &lt;mkdir dir="${build}" /&gt;
     &lt;/target&gt;
  
     &lt;target name="clean"&gt;
        &lt;delete dir="${build}" failonerror="false"/&gt;
     &lt;/target&gt;
  
     &lt;target name="build" depends="prepare"&gt;
        &lt;javac srcdir="${src.dir}"
               includeantruntime="false"
               destdir="${build}"&gt;
          &lt;src path="src"/&gt;
           &lt;classpath refid="compile.classpath"/&gt;
        &lt;/javac&gt;
     &lt;/target&gt;
  
     &lt;target name="execute.java" depends="build"
             description="Run the program"&gt;
           &lt;echo message="command line execute: java -cp classes main, MovieDescription, MovieLibrary" /&gt;
           &lt;java classname="main" fork="yes"&gt;
             &lt;classpath refid="compile.classpath"/&gt;
           &lt;/java&gt;
     &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>thanks in advance</p>