Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comment lines in manifest of a jar

Tags:

java

jar

Is there a way to insert a comment line in the manifest of a jar file?

like image 491
jens Avatar asked Jan 08 '10 06:01

jens


People also ask

How do you comment a line in a manifest 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.

What is the significance of the manifest in a JAR file?

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.

How do you know if a jar is manifest?

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.


2 Answers

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 :)

like image 130
Thorbjørn Ravn Andersen Avatar answered Oct 29 '22 04:10

Thorbjørn Ravn Andersen


The manifest specification does not describe any method for writing comments into the manifest, so I believe not.

like image 43
avpx Avatar answered Oct 29 '22 02:10

avpx