title: Eclipse: Adding all the jars from a folder in java classpath
body: <p>Is there a way to include all the jar files within a directory in the classpath using Eclipse?</p>
  
  <p>It can be done by using command line by the following command:</p>
  
  <pre><code>java -cp "lib/*" my.package.Main
  </code></pre>
  
  <p>But how can it be done from eclipse?</p>
  
  <p><strong>EDIT:</strong> I edited the <code>.classpath</code> entry in my project floder as:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;classpath&gt;
      &lt;classpathentry kind="src" path="src"/&gt; 
      &lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/&gt;
      &lt;classpathentry kind="lib" path="F:/Program Files/Java/log4j/apache-log4j-2.0-alpha2-bin/*"/&gt;
      &lt;classpathentry kind="output" path="classes"/&gt;
  &lt;/classpath&gt;
  </code></pre>
  
  <p>Here <code>F:/Program Files/Java/log4j/apache-log4j-2.0-alpha2-bin/</code> is the folder where the <code>jar</code> files are. But it didn't work.</p>
  
  <p><strong>UPDATE:</strong> It seems that there is no direct way to do this. And may be the easiest solution will be creating a user library.</p>