[英]What is the equivalent to JAR file META-INF/MANIFEST.MF for a JIMAGE file?
I work primarily with Scala , which up until now has been most compatible with Java 8. However, I've been kicking the tires of Java 11, and one particular element of the switch to modules has intrigued me...我主要与Scala合作,到目前为止,它与Java 8 最兼容。但是,我一直在踢Java的轮胎,并且我发现其中一个特定的模块具有...
When dealing with a library packaged in a JAR file, it's fairly straightforward to retrieve information about it by examining the standard attributes in the embedded META-INF/MANIFEST.MF
file, such as the implementation and specification vendor, title & version , etc. (OK, so that file, or some of these attributes, may be missing, but they're typically available for what I use.)在处理打包在JAR文件中的库时,通过检查嵌入式
META-INF/MANIFEST.MF
文件中的标准属性(例如实现和规范供应商、标题和版本等)来检索有关它的信息相当简单。 (好的,因此该文件或其中一些属性可能会丢失,但它们通常可用于我使用的内容。)
However, it seems that the new JIMAGE format explicitly forbids the use of a META-INF/MANIFEST.MF
file.但是,似乎新的JIMAGE格式明确禁止使用
META-INF/MANIFEST.MF
文件。 (See this bug report as one example.) (请参阅此错误报告作为示例。)
Is there a way to specify and retrieve the corresponding information for a library packaged in a JIMAGE file?有没有办法为JIMAGE文件中打包的库指定和检索相应的信息? In particular, I would like to both define and obtain the equivalent values for the following standard manifest attributes:
特别是,我想定义和获取以下标准清单属性的等效值:
Implementation-Title
Implementation-Vendor
Implementation-Version
Specification-Title
Specification-Vendor
Specification-Version
The jimage format is only used internally, to store the class files that are part of the JDK. jimage 格式仅在内部使用,用于存储作为 JDK 一部分的 class 文件。 It's not a general format for packaging libraries and is not available for use outside of the JDK.
它不是打包库的通用格式,不能在 JDK 之外使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.