title: Netbeans Jar file not executing
body: <p>I have been working on a project using Netbeans (7.4 Development Version), and I want to test the jar distributable.  When I use 'java -jar filename.jar', the program works fine.  But when I try to double-click the jar file, I get this kind of error:  <code>Error: Could not find or load main class W:\pathtoproject\dist\jarname.jar</code>.  </p>
  
  <p>This doesn't make sense, I've never seen an error where the jar file thinks it is the main class.  I defined the main class in the project properties.  I extracted the jar file and saw that the Manifest file has the correct main class defined.  How can I fix this error?  </p>
  
  <p><strong>Edit</strong>:  The manifest in the jar file has this:</p>
  
  <pre><code>Manifest-Version: 1.0
  Ant-Version: Apache Ant 1.9.1
  Created-By: 1.7.0_21-b11 (Oracle Corporation)
  Class-Path: 
  X-COMMENT: Main-Class will be added automatically by build
  Main-Class: Driver
  </code></pre>
  
  <p>Driver does indeed have the usual main method.</p>
  
  <p><strong>Edit 2</strong>:  I don't know if it makes a difference, but my driver and some other important classes are not part of any package.  Only helper classes are packaged.  I was trained to code the hard way (i.e. notepad and cmd), so I'm not used to using all the features that Netbeans has to offer ( such as packaging).</p>