title: How to setup Main class in manifest file in jar produced by NetBeans project
body: <p>I have the following problem. I have a Java project in my NetBeans IDE 6.8. When I compile it and it produces a .jar file containing everything possible, the META-INF is not right. It doesn't contain the class to be executed - with main() method. </p>
  
  <p>When I click the Run button inside the IDE, everything works. The settings of the project are also set the right way - pointing to a class in my project.</p>
  
  <p>I tried adding a folder META-INF with manifest file but I didn't manage.</p>
  
  <p>Is there a way to do this manually in NetBeans, because I found that if I add the missing Main class in the manifest, everything works.</p>
  
  <p>(I suppose I hit some sort of bug...)</p>
  
  <p>//edit:
  The result I'm after is that I want the jar that is created with the build of NetBeans to be executable with command:</p>
  
  <p>Quote from <a href="http://java.sun.com/docs/books/tutorial/deployment/jar/run.html" rel="noreferrer">Sun Documentation</a> :</p>
  
  <p>When the Main-Class is set in the manifest file, you can run the application from the command line: 
  <code>java -jar app.jar</code></p>