title: Java command-line problems with .jar libraries
body: <p>I have a single .java (driver.java) file I'm trying to compile and run from the command-line. It uses the external library called <code>EXT.jar</code>, whose structure is just a folder called EXT with a few dozen classes within it.</p>
  
  <p>So I run:</p>
  
  <pre><code>javac -cp EXT.jar driver.java
  </code></pre>
  
  <p>This compiles the class just fine.</p>
  
  <p>then when I run:</p>
  
  <pre><code>java -cp EXT.jar driver
  </code></pre>
  
  <p>I get a <code>java.lang.NoClassDefFoundError</code>.</p>
  
  <p>Oddly enough, if I unpack the JAR (so now I have a folder in the root directory called EXT), the last command works just fine!! Driver will execute!</p>
  
  <p>Is there any way I can make the driver.class look for the need class files from <code>EXT.jar/EXT/*class</code> instead of an actual EXT folder?</p>
  
  <p>Thanks!</p>