JDK-6320082 : rt.jar appears corrupted in jdk1.5.0_04\jre\lib
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 8.0pe,8.1ee,1.4.2,5.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-09-06
  • Updated: 2011-02-16
  • Resolved: 2006-03-16
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
I downloaded the JDK and installed per instructions.  I tried the following simple program:

import javax.swing.JApplet;
import java.awt.Graphics;

public class MyFirstApplet extends JApplet
{
  public void paint(Graphics g)
  {
    g.drawstring("To climb a ladder, start at the bottom rung", 20, 90);
  }
}

When I compiled using "javac" in a DOS window, I got the following error:

java.lang.InternalError: jzentry == 0,
 jzfile = 2512584,
 total = 12922,
 name = C:\Program Files\Java\jdk1.5.0_04\jre\lib\rt.jar,
 i = 3688,
 message = invalid LOC header (bad signature)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:430)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:416)
        at com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1447
)
        at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1742)
        at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1882)
        at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1901)
        at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1538)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
        at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:249)
        at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:214)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:228)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:441)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:426)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:413)
        at com.sun.tools.javac.main.Main.compile(Main.java:592)
        at com.sun.tools.javac.main.Main.compile(Main.java:544)
        at com.sun.tools.javac.Main.compile(Main.java:67)
        at com.sun.tools.javac.Main.main(Main.java:52)
>

This problem looked similar to bug 4977607,  so I downloaded the JDK again, on 29 Aug 05, and got the same error.  The version of the JDK I downloaded is jdk-1_5_0_04-nb-4_1-win.exe. Thefile size was correct both times I downloaded.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See above.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I was expecing a successful comilation of a very basic applet.
ACTUAL -
The compiler error above.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.lang.InternalError: jzentry == 0,
 jzfile = 2512584,
 total = 12922,
 name = C:\Program Files\Java\jdk1.5.0_04\jre\lib\rt.jar,
 i = 3688,
 message = invalid LOC header (bad signature)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:430)
        at java.util.zip.ZipFile$3.nextElement(ZipFile.java:416)
        at com.sun.tools.javac.jvm.ClassReader.openArchive(ClassReader.java:1447
)
        at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1742)
        at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1882)
        at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1901)
        at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1538)
        at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
        at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:249)
        at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:214)
        at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:228)
        at com.sun.tools.javac.comp.Enter.complete(Enter.java:441)
        at com.sun.tools.javac.comp.Enter.main(Enter.java:426)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:413)
        at com.sun.tools.javac.main.Main.compile(Main.java:592)
        at com.sun.tools.javac.main.Main.compile(Main.java:544)
        at com.sun.tools.javac.Main.compile(Main.java:67)
        at com.sun.tools.javac.Main.main(Main.java:52)

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import javax.swing.JApplet;
import java.awt.Graphics;

public class MyFirstApplet extends JApplet
{
  public void paint(Graphics g)
  {
    g.drawstring("To climb a ladder, start at the bottom rung", 20, 90);
  }
}
---------- END SOURCE ----------

Comments
EVALUATION The installer used is from the NetBeans bundle... jdk-1_5_0_04-nb-4_1-win.exe Can the submitter use the full path to java and return the output of "java -fullversion" ? I'd like to confirm that the expected version of java is being used. Lastly, can the submitter try to download the non-NetBeans JDK bundle from java.sun.com and try to reproduce the problem? This would be helpful to isolating the root cause.
02-11-2005