[NJ]: That must be a quick way to write a file from the command line, under the Unice. It works on my Windows 2000 system too, if I drop the quotes. But usually I just use a Cygwin shell so I don't have to think as much about Unix/Windows differences, except for filepaths mostly.
[NJ]: Also, when I opened the file in binary mode in my editor, there were characters showing up that did not show up in open/text-mode. OK. Depends what system and what editor you're using, I suppose. But the manifest file should be treated as a text file anyway, I think, so this is probably a non-issue. You can create the text file any way you like - whatever works on your system.
[NJ]: Quite a bit more than an operating system would need for a file header, I assumed it had something to do with the archiving protocol. The question, in part though not stated, is that the jar tool can more than understand this data that is not explained to me and I can just grab the manifest file from the last build, make the appropreiate entry - and jumping around from one compiler version to another will not confuse the jar tool, correct ? The jar tool does a little more than just archiving - in particular it has a bit of custom logic for handling manifest files differently than other files. Changing compiler versions shouldn't bother the jar tool, as far as I know. That's more of an issue between compiler and JVM, e.g. if you compile for 1.5 and try to run on a 1.4 JVM - you can't. In comparison, hte jar tool could care less what compiler version you're using. As far as I know, anyway.
[NJ]: Also, correct syntax:
Main-Class: Alice
Correct ? Is it picky about spaces ? I doubt it. Personally I just use a single space after the :, none before, and it just works. If I were really curious I would consult the
jar command documentation which leads in turn to the
JAR manifest docs. Or, well, I'd just try it and see what happens. Thus far though, I've been content to just use the standard spacing I saw in the first example I found when I googled "jar manifest".
[ November 25, 2006: Message edited by: Jim Yingst ]