Line order in Java manifest file
•
Java
Is the order of lines in the manifest file important?
Someone tried to convince me that when the manifest file changed, things would break
Manifest-Version: 1.0 Class-Path: xxx.jar Main-Class: com.something
to
Manifest-Version: 1.0 Main-Class: com.something Class-Path: xxx.jar
(the main class and class path lines are opposite.)
Solution
No, the order of these two lines doesn't matter
This is a reference to the documentation:
Internally, the list is represented by HashMap, which is an unordered data structure If you want to take a closer look, this is the source code java util. jar. Manifest.
> http://www.massapi.com/source/jdk1.6.0_17/src/java/util/jar/Manifest.java.html
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码