简体   繁体   English

对于 JIMAGE 文件,什么相当于 JAR 文件 META-INF/MANIFEST.MF?

[英]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.

相关问题 META-INF / MANIFEST.MF文件中的库依赖关系 - library dependencies in META-INF/MANIFEST.MF file jar文件中缺少主要属性,MANIFEST.MF文件位于META-INF文件夹中 - Missing main attribute inside the jar file, the MANIFEST.MF file is located in META-INF folder 如何从* .war / META-INF / MANIFEST.MF文件中读取manifest.mf? - How to read manifest.mf from *.war/META-INF/MANIFEST.MF file? Java - 即使 MANIFEST.MF 文件位于 /META-INF 中,App.jar 中也没有主要清单属性 - Java - No Main Manifest Attribute, in App.jar error even though MANIFEST.MF file is in /META-INF 如何在Spring Boot应用程序中读取我的META-INF / MANIFEST.MF文件? - How to read my META-INF/MANIFEST.MF file in a Spring Boot app? 在unnamed.war中找不到META-INF / MANIFEST.MF文件 - META-INF/MANIFEST.MF file not found in unnamed.war 提取和重新创建的jar不支持“ META-INF / MANIFEST.MF”中的清单。 - Extracted and recreated jar does not honor manifest at `META-INF/MANIFEST.MF` Aws Lambda访问META-INF / MANIFEST.MF? - Aws Lambda access to META-INF/MANIFEST.MF? 为什么喜欢/ WEB-INF / lib到/META-INF/MANIFEST.MF用于webapps? - Why prefer /WEB-INF/lib to /META-INF/MANIFEST.MF for webapps? 在jar中解析manifest.mf文件的条目的正确方法是什么? - What is the proper way to parse the entries of a manifest.mf file in jar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM