简体   繁体   English

修改的清单文件部分不起作用

[英]Modified manifest file partially not working

My manifest file (Manifest.txt) looks like this: 我的清单文件(Manifest.txt)如下所示:

Main-Class: packageName.ClassName
Class-Path: jarFile1.jar:

However, when I execute the following command in Linux: 但是,当我在Linux中执行以下命令时:

jar cfm jarFile.jar Manifest.txt -C Classes .

When I look at jarFile's META-INF/MANIFEST.MF I only see the modified main class, without the modified class path: 当我查看jarFile的META-INF / MANIFEST.MF时,我只看到修改后的主类,而没有修改后的类路径:

Manifest-Version: 1.0
Created-By: 1.8.0_71 (Oracle Corporation)
Main-Class: packageName.className

Does anybody know why is this happening? 有人知道为什么会这样吗?

To be clear, my target was to get the following output: 明确地说,我的目标是获得以下输出:

Manifest-Version: 1.0
Created-By: 1.8.0_71 (Oracle Corporation)
Main-Class: packageName.className
Class-Path: jarFile1.jar

jar reads complete lines from the input manifest. jar从输入清单中读取完整的行。 Ensure that the file ends in a carriage return otherwise the last line will be omitted 确保文件以回车结尾,否则将省略最后一行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM