Is there a way to insert a comment line in the manifest of a jar file?
You can always use a keyword like X-JENS-COMMENT, and then put your comment in the value. Use a wording which is certain not to collide with anything Sun could come up with :) Nice idea.
The answer is the JAR file's manifest. The manifest is a special file that can contain information about the files packaged in a JAR file. By tailoring this "meta" information that the manifest contains, you enable the JAR file to serve a variety of purposes.
NetBeans IDE The following screen snapshot demonstrates viewing the manifest file. This was easily brought up in NetBeans by simply using File --> Open File and selecting jdiff. jar to have it displayed as shown in the next screen snapshot.
You can always use a keyword like X-JENS-COMMENT, and then put your comment in the value.
Use a wording which is certain not to collide with anything Sun could come up with :)
The manifest specification does not describe any method for writing comments into the manifest, so I believe not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With