JDK-7191282 : Java can't execute jar files containing more than 65536 files.
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2012-08-14
  • Updated: 2012-10-01
  • Resolved: 2012-08-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u40Resolved
Related Reports
Duplicate :  
Relates :  
Description
Java can't execute jar files containing more 64K files if main class is specified in manifest. The only problem - the manifest can't be read.
Running "java -jar chain.jar" got message:
"Error: Invalid or corrupt jarfile chain.jar"

At the same moment using the following commant line is ok. "java -cp chain.jar <main class>"
How reproduce:
1. compile attached sources. "javac -d classes src/oracle/jsr335/linkage/arg0/inner/*.java"
2. create jar file with main class in the manifest: "jar c0fe chain.jar oracle.jsr335.linkage.arg0.inner.Main -C classes/ ."
3. try to execute. "java -jar chain.jar"

Note: when you succesfully fix manifect reading  - don't forget to increase PermGenSize (default is not enough for that test).

Comments
EVALUATION src/share/bin/parse_manifest.c has its own implementation to read zip file, which does not appear to support ZIP64.
17-08-2012