title: Difference between setting classpath in build.xml using fileset and pathelement
body: <p>I have a build file that declares the classpath as shown</p>
  
  <pre><code>&lt;path id="compile.classpath"&gt;
      &lt;fileset dir="${basedir}/lib"    includes="**"/&gt;        
      &lt;fileset dir="${jboss.home}/lib" includes="**"/&gt;        
      &lt;pathelement path ="${build.classes.dir}"/&gt;
  &lt;/path&gt;
  </code></pre>
  
  <p>I tried looking at the documentation but I am not able to understand the <strong>use of</strong>
  <code>pathelement</code>.</p>
  
  <p>I know that the ID is used to refer to this class path while performing a task and fileset includes the jarfiles.</p>
  
  <p>edit 1:
  <strong>My doubt is Why can't we use <code>fileset</code> to include the class files in place of <code>pathelement</code>?</strong></p>