manifest.mf

How to read MANIFEST.MF file from JAR using Bash

前提是你 提交于 2019-11-26 15:19:02
问题 I need to read MANIFEST.MF maven manifest file from "some.jar" using bash 回答1: $ unzip -q -c myarchive.jar META-INF/MANIFEST.MF -q will suppress verbose output from the unzip program -c will extract to stdout Example: $ unzip -q -c commons-lang-2.4.jar META-INF/MANIFEST.MF Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.0 Created-By: 1.5.0_13-119 (Apple Inc.) Package: org.apache.commons.lang Extension-Name: commons-lang Specification-Version: 2.4 Specification-Vendor: Apache Software

Use of the MANIFEST.MF file in Java

心不动则不痛 提交于 2019-11-26 06:58:02
问题 I noticed that JAR, WAR and EAR files have a MANIFEST.MF file under the META-INF folder. What is the use of the MANIFEST.MF file? What all things can be specified in this file? 回答1: The content of the Manifest file in a JAR file created with version 1.0 of the Java Development Kit is the following. Manifest-Version: 1.0 All the entries are as name-value pairs. The name of a header is separated from its value by a colon. The default manifest shows that it conforms to version 1.0 of the

Reading my own Jar's Manifest

天涯浪子 提交于 2019-11-26 00:32:41
问题 I need to read the Manifest file, which delivered my class, but when I use: getClass().getClassLoader().getResources(...) I get the MANIFEST from the first .jar loaded into the Java Runtime. My app will be running from an applet or a webstart, so I will not have access to my own .jar file, I guess. I actually want to read the Export-package attribute from the .jar which started the Felix OSGi, so I can expose those packages to Felix. Any ideas? 回答1: You can do one of two things: Call