JDK-6808540 : [SC] Is the Extra field code " FE CA 00 00" being used in jar file a "MUST" thing?
  • Type: Bug
  • Component: tools
  • Sub-Component: jar
  • Affected Version: 5.0u16
  • Priority: P2
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2009-02-23
  • Updated: 2014-10-27
  • Resolved: 2009-02-23
Related Reports
Relates :  
Description
Jar file format is based on zip file format.
And jar tool seems to write out the code "0xFE 0xCA 00 00" in
the extra field of the file format in generating a jar file.

Is the extra field code " FE CA 00 00" a "MUST" thing in the view of jar file specification?
In other words, is a JAR file required to have the magic number in the extra field?

Comments
EVALUATION The JAR_MAGIC "0xCAFE" in the extra field data of the first JAR entry from our JarOutputStream implementation is not required by JAR specification. It's an "internal implementation detail" to support "executable" jar on Solaris platform. see#4138619. It would be incorrect to reject a JAR file that does not have this extra field data, from specification point of view.
23-02-2009