title: How to compile Java program with .jar library
body: <p>I can't make javac recognize an external .jar file, whose classes I'm trying to extend. I have two files in the same directory: TestConsole.java and acm.jar. I'm compiling from the same directory using the following command:</p>
  
  <p><code>javac -classpath .:acm.jar TestConsole.java</code></p>
  
  <p>But it seems like javac is just ignoring acm.jar. It gives me the error:</p>
  
  <pre><code>TestConsole.java:1: package acm does not exist
  import acm.program;
            ^
  </code></pre>
  
  <p>Of course, acm.program is a package in acm.jar. All of the classes in acm.jar are already compiled; I just want to use them in my classes, not compile them.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>I am running this on a Mac, and the directory structure of acm.jar appears to be valid: It contains an <code>acm/program</code> directory, which has <code>ConsoleProgram.class</code>, the only class that <code>TestConsole</code> extends.</p>
  
  <p><code>javac -classpath ".:acm.jar" TestConsole.java</code> does not work, either.</p>