title: How to run a java class with a jar in the classpath?
body: <p>So, I can do this very well:</p>
  
  <pre><code>java mypackage.MyClass
  </code></pre>
  
  <p>if <code>./mypackage/MyClass.class</code> exists. I can also happily do this:</p>
  
  <pre><code>java -cp myjar.jar mypackage.MyClass
  </code></pre>
  
  <p>if the class file exists in the appropriate part of the jar. Easy stuff. But I can't for the life of me manage to do something like this:</p>
  
  <pre><code>java -cp utilities.jar mypackage.MyClass
  </code></pre>
  
  <p>where <code>./mypackage/MyClass.class</code> exists, and where <code>./utilities.jar</code> exists (not containing MyClass, of course).</p>
  
  <p>Am I about to feel stupid?</p>