title: Getting Ant <javac> to recognise a classpath
body: <p>I have an Apache Ant build file with a <code>&lt;javac&gt;</code> command that requires four specific JARs to be on the build <code>classpath</code>. I've tried to do this:</p>
  
  <pre><code>&lt;project basedir=".." default="build_to_jar" name="Transnet Spectrum Analyzer"&gt;
      &lt;property environment="env"/&gt;
      &lt;property name="src" value="src"/&gt;
      &lt;property name="libsrc" value="library_sources" /&gt;
      &lt;property name="build" value="build"/&gt;
      &lt;property name="dist" value="dist"/&gt;
      &lt;property name="target" value="1.5"/&gt;
      &lt;property name="libraries" value="./libraries"/&gt;
  
      &lt;fileset dir="." id="TSA.classpath"&gt;
          &lt;include name="${libraries}/rxtx/RXTXcomm.jar" /&gt;
          &lt;include name="${libraries}/commons-logging-1.1.1.jar" /&gt;
          &lt;include name="${libsrc}/JCommon/jcommon-1.0.15.jar" /&gt;
          &lt;include name="${libsrc}/JFreeChart/jfreechart-1.0.12.jar" /&gt;
      &lt;/fileset&gt;
  
      &lt;target name="compile" depends="clean,init" description="compile the source " &gt;
  
          &lt;echo&gt;Compile from ${src} to ${build}&lt;/echo&gt;
  
          &lt;javac destdir="${build}" source="${target}" target="${target}"&gt;
              &lt;compilerarg value="-Xlint:unchecked"/&gt;
              &lt;src path="${src}"/&gt;
              &lt;classpath path="TSA.classpath" /&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
  
      &lt;!-- blah blah blah --&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>…but none of the files specified in <code>TSA.classpath</code> appear to show up. How do I include these files in my classpath?</p>