title: Importing external classes with out an IDE
body: <p>I'm just wondering how to import classes located in a .jar file with out using an IDE. The jar file is in the same directory as the java file.
  So for example the jar file is called "someclasses.jar" and my file is called program.java</p>
  
  <p>I've done research and I just can't seem to get it to work. I'm not sure if I'm doing the class path correctly either. Is this close to how it should be done:</p>
  
  <pre><code>import someclasses.*;
  </code></pre>
  
  <p>and when compiling and running:</p>
  
  <pre><code>javac -cp '.:someclasses.jar' program.java
  
  java -cp '.:someclasses.jar' program
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>