JDK-8037387 : Java still can't execute jar files containing more than 65536 files on Mac OS X
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 7u51
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2014-03-12
  • Updated: 2014-11-14
  • Resolved: 2014-03-14
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Version : 10.8.5

A DESCRIPTION OF THE PROBLEM :
The problem is the same that the one explained in bug 7191282 : http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7191282

The bug is still not fixed on Mac OS X.

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).



ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error: Invalid or corrupt jarfile chain.jar

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Closing as a duplicate of https://bugs.openjdk.java.net/browse/JDK-7194005. No plans to fix in jdk7u right now.
14-03-2014