title: "invalid header field" (in manifest?) when creating JAR
body: <p>I'm an experienced developer, but with very little Java experience. At my work, I've inherited a small JNLP project that needs to operate outside the sandbox (<code>all-permissions</code>). With JDK 1.7.0_51, I gather we now need to put "<code>Permissions: all-permissions</code>" in the manifest as well.</p>
  
  <p>Up to now, we've been building it with DrJava, but in the DrJava menu <strong>Project | Create Jar File from Project</strong>, the checkbox for <strong>Custom Manifest</strong> is "grayed out" (unavailable). Consequently, I'm trying for the first time to build a JAR from the command line.</p>
  
  <p>I've put the following in a file called 'manifest.txt':</p>
  
  <pre><code>Permissions: all-permissions
  Main-class: main
  </code></pre>
  
  <p>(I believe that <code>Main-class: main</code> is needed, and that DrJava has up to now been doing that implicitly for me.) And, yes, I do have a newline after the last line.</p>
  
  <p>When I try to build the JAR with a command line along the lines of...</p>
  
  <pre><code>jar -cvfm foo.jar manifest.txt main.class UUID.class etc.class
  </code></pre>
  
  <p>... I get the following exception:</p>
  
  <pre><code>java.io.IOException: invalid header field
      at java.util.jar.Attributes.read(Attributes.java:389)
      at java.util.jar.Manifest.read(Manifest.java:182)
      at java.util.jar.Manifest.&lt;init&gt;(Manifest.java:52)
      at sun.tools.jar.Main.run(Main.java:151)
      at sun.tools.jar.Main.main(Main.java:1149)
  </code></pre>
  
  <p>I'm running on Microsoft Windows 7, for what little that may be worth. Also, for what it's worth, I've seen examples online with both '<code>cvfm</code>' and '<code>-cvfm</code>'. I've tried both, it doesn't seem to matter.</p>
  
  <p>I presume the problem is in my manifest.txt, and I've read <a href="http://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html" rel="nofollow">http://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html</a>, but I don't see what I might be doing wrong.</p>
  
  <p>I'd be perfectly happy with either a DrJava solution or a command-line solution.</p>