java jar 清单中的注释行

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2025872/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 18:59:22  来源:igfitidea点击:

Comment lines in manifest of a jar

javajar

提问by jens

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

有没有办法在 jar 文件的清单中插入注释行?

采纳答案by Thorbj?rn Ravn Andersen

You can always use a keyword like X-JENS-COMMENT, and then put your comment in the value.

您始终可以使用 X-JENS-COMMENT 之类的关键字,然后将您的评论放在值中。

Use a wording which is certain not to collide with anything Sun could come up with :)

使用肯定不会与 Sun 提出的任何内容冲突的措辞:)

回答by avpx

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

清单规范没有描述任何方法编写注释成清单,所以我不信。

回答by sailor

I am not sure whether it will work with a pure Java JAR manifest, but in a OSGi bundle manifest comments can be given like this.

我不确定它是否适用于纯 Java JAR 清单,但在 OSGi 包清单中可以像这样给出注释。

Comment:This is comment
Manifest-Version:1.0
Bundle-ManifestVersion:3
Bundle-Name:abc_X.X.X.X.jar