title: ant, jar files, and Class-Path oh my
body: <p>I am trying to rearchitect my build technique for creating Java jar files which depend on common 3rd party jar files. (GlazedLists, Apache Commons, etc.)</p>
  
  <p>I had been chucking them all into {Java JRE dir}/lib/ext so they would automatically be seen by the JRE, but that led to problems like not remembering that I need to distribute certain jar files, so I'd like to learn to be more explicit.</p>
  
  <p>So I moved them all into c:\appl\java\common\, added them to the Eclipse build path, aand defined this in my ant file:</p>
  
  <p></p>
  
  <pre><code>&lt;path id="javac_classpath"&gt;
      &lt;fileset dir="${libDir}"&gt;
          &lt;include name="*.jar"/&gt;
      &lt;/fileset&gt;
      &lt;fileset dir="c:/appl/java/common"&gt;
          &lt;include name="*.jar"/&gt;
      &lt;/fileset&gt;
  &lt;/path&gt;
  </code></pre>
  
  <p>I have my Class-Path manifest header set to "." in my <code>jar</code> task but that doesn't seem to work even if I put the relevant jar files into the same directory as my application jar file. I can add them all manually one-by-one to the Class-Path header, but I'm wondering, is there an easier way to get the Class-Path header setup properly?</p>