executable jar Could not find or load main class
<p>I've been struggling with this common error and just can't resolve it. This application is composed of multiple packages and runs fine within JCreator (at the moment I need to use this IDE rather than Eclipse). </p>

<p>My manifest file is here (there are 2 blank lines at the end):</p>

<pre><code>Manifest-Version: 1.0
Created-By: 1.6.0_45 (Sun Microsystems Inc.)
Main-Class: C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main\DPMain
</code></pre>

<p>I wrote a bat file to create the jar:</p>

<blockquote>
  <p>jar -cvfm DPlus.jar C:\COMPILE\MyProjects\douwe\classes\MANIFEST.MF
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main*.class 
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\library*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\command*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file\display*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\command*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\file\display*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\gui*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\gui*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\job*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\job*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\types*.class
  C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\util*.class</p>
</blockquote>

<p>When I try to execute with the command </p>

<blockquote>
  <p>C:\COMPILE\MyProjects\douwe\classes>java -jar DPlus.jar</p>
</blockquote>

<p>I always get the error:</p>

<pre><code>Error: Could not find or load main class C:\COMPILE\MyProjects\douwe\classes\dykstra\dplus\main\DPMain
</code></pre>

<p>Can anyone see what I'm doing wrong here?</p>