title: Java classpath losing Main Class when multiple jar
body: <p>Can someone explain me why when I got multiple jar in my classpath, java can't find my main class ?</p>
  
  <p>if I try </p>
  
  <pre><code>java -cp MyJar.jar package.App
  </code></pre>
  
  <p>I got something i wannt, currently an error since some libs are missing</p>
  
  <p>But if I try</p>
  
  <pre><code>java -cp lib/*:MyJar.jar package.App
  </code></pre>
  
  <p>or even </p>
  
  <pre><code>java -cp lib/*:MyJar.jar:. package.App
  </code></pre>
  
  <p>I got the error </p>
  
  <pre><code>Could not find or load main class
  </code></pre>