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