在 JAR 中找到的 MANIFEST.MF
文件中,第一行是 Manifest-Version: 1.0
。根据Java Tutorials ,第一行表示“默认 list 符合 list 规范的 1.0 版”。
那么在什么情况下 Manifest-Version
不是 1.0
?
此外, list 规范是什么?为什么默认 list 必须符合它?我有 seen multiple explanations再次解释“默认 list 符合 list 规范的 1.0 版”,但没有解释 list 规范是什么。
最佳答案
JAR File Specification - Manifest Specification州,
Manifest-Version: Defines the manifest file version. The value is a legitimate version number, as described in the above spec.
版本号是
version-number : digit+{.digit+}*
还有一个注释
Versions:
Manifest-Version and Signature-Version must be first, and in exactly that case (so that they can be recognized easily as magic strings). Other than that, the order of attributes within a main section is not significant.
我不相信 Sun 或 Oracle 曾经发布过 list 规范的另一个版本(但他们可以,并且这允许他们提供 future 校对)。此外,它被视为一个神奇的字符串。
关于java - 什么是 MANIFEST.MF 中的 list 版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27477973/