> On 20 Nov 2015, at 14:35, Tom Bentley <t.j.bent...@gmail.com> wrote: > > Yes, but my point is that it's not specified here > http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html which is > the specification of the _file format_. The fact that the jar tool happens > to put the manifest first is immaterial since the file format specification > just says that a jar is a zip file. Thus I should be able to create that > file however I chose, not necessarily with the jar tool.
While not being spec’ed as such, it is required, see the code that parses a JAR input stream ([1]). It will only parse the manifest if it is listed as first entry. This is also quite reasonable as the manifest might contain the signatures necessary for the rest of the files, so it should be one of the first entries to be read in order to have that information ready for the remainder of the entries. 1. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/jar/JarInputStream.java#80 -- Met vriendelijke groeten | Kind regards Jan Willem Janssen | Software Architect +31 631 765 814 My world is revolving around INAETICS and Amdatu Luminis Technologies B.V. Churchillplein 1 7314 BZ Apeldoorn +31 88 586 46 00 http://www.luminis-technologies.com http://www.luminis.eu KvK (CoC) 09 16 28 93 BTW (VAT) NL8169.78.566.B.01
signature.asc
Description: Message signed with OpenPGP using GPGMail