如何使用Bash从JAR读取MANIFEST.MF文件

问题描述

@H_403_0@$ unzip -q -c myarchive.jar Meta-INF/MANIFEST.MF @H_403_0@$ 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 Foundation Specification-Title: Commons Lang Implementation-Version: 2.4 Implementation-Vendor: Apache Software Foundation Implementation-Title: Commons Lang Implementation-Vendor-Id: org.apache X-Compile-Source-JDK: 1.3 X-Compile-Target-JDK: 1.2

或者,您可以使用-p代替-q -c

-p将文件提取到管道(stdout)。除了文件数据外,什么都没有发送到stdout,并且文件总是以二进制格式提取,就像存储文件一样(不进行转换)。

解决方法

我需要使用bash从“ some.jar”中读取MANIFEST.MF Maven清单文件

猜你在找的技术问答相关文章

如何检查配对的蓝牙设备是打印机还是扫描仪(Android)
是否允许实体正文进行HTTP DELETE请求?
如何将ZipInputStream转换为InputStream?
java.util.logging Java 8中的变量
PowerMockito.doReturn返回null
Java中的RESTful调用
Swing / Java:如何正确使用getText和setText字符串
特殊字符和重音字符
Android Studio中的ndk.dir错误
错误“找不到主类”