aspose file tools*
The moose likes Beginning Java and the fly likes Manifest Version Headers Appearing Out Of Order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Manifest Version Headers Appearing Out Of Order" Watch "Manifest Version Headers Appearing Out Of Order" New topic
Author

Manifest Version Headers Appearing Out Of Order

Ned Rolfs
Greenhorn

Joined: Jun 12, 2011
Posts: 1
I am trying to learn about the sdk jar utility and going through the oracle tutorial on the subject. I am using jdk1.6.0_24, WindowsXP Pro, and the following directory structure:

manifest.txt
tests\test\TestPackageClass.class

When I get to adding versioning information to the manifest file my resulting manifest appears to display the information out of order. I create the following manifest file with a carriage return on the last line that reads "Implementation-Vendor: Test Vendor":

Name: tests/test/
Specification-Title: Test Classes
Specification-Version: 1.0
Specification-Vendor: Test Vendor
Implementation-Title: tests.test
Implementation-Version: build001
Implementation-Vendor: Test Vendor


I then execute the following command:

"jar cvmf manifest.txt TestPackage.jar tests/test"

Then when I extract and check the META-INF\MANIFEST.MF it reads as follows:


Manifest-Version: 1.0
Implementation-Vendor: Test Vendor
Implementation-Title: tests.test
Implementation-Version: build001
Specification-Vendor: Test Vendor
Name: tests/test/
Created-By: 1.6.0_21 (Sun Microsystems Inc.)
Specification-Title: Test Classes
Specification-Version: 1.0


Can someone tell my why these headers are out of order. Thanks!


Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14270
    
  21

Welcome to the Ranch.

The order of attributes in the manifest file doesn't matter.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Manifest Version Headers Appearing Out Of Order