0

My manifest file (Manifest.txt) looks like this:

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

However, when I execute the following command in 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:

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
ndi equals
  • 187
  • 1
  • 9
  • As I mentioned in the first line, it looks like this: Main-Class: packageName.ClassName Class-Path: jarFile1.jar: – ndi equals Sep 25 '16 at 22:02

1 Answers1

0

jar reads complete lines from the input manifest. Ensure that the file ends in a carriage return otherwise the last line will be omitted

Reimeus
  • 158,255
  • 15
  • 216
  • 276