This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm using Windows XP OS SP2 and just installed jdk1.5.0_06. I just finished the "Head First Java" book (which was excellent) and had no problems with any compiling throughout the whole book on an old computer. My new (used by someone prior to me) computer will not compile anything. None of the applications I compiled will work either.
Here is what happens when I attempt to compile:
C:\javabook\gui>javac TwoButtons.java An exception has occurred in the compiler (1.5.0_06). Please file a bug at the J ava Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnosti c in your report. Thank you. java.lang.InternalError: jzentry == 0, jzfile = 2591288, total = 12932, name = C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar, i = 4929, message = invalid LOC header (bad signature) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:429) at java.util.zip.ZipFile$3.nextElement(ZipFile.java:415) 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:256) at com.sun.tools.javac.tree.Tree$TopLevel.accept(Tree.java:382) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:221) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:235) at com.sun.tools.javac.comp.Enter.complete(Enter.java:448) at com.sun.tools.javac.comp.Enter.main(Enter.java:433) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:403) 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)
I have never seen that error before. I suggest that you do as it says and file a bug report at the given URL. Perhaps they can tell you how to fix the problem.
Also, you can't expect to run a program unless you have a compiled .class file. During development, you typically get this file by running javac to compile your .java files. Perhaps you should compile a program on your old machine and copy the .class file to the new one to see if you can run it. Of course, this doesn't do a lot of good since you need to be able to compile programs on your new machine. Sorry that I can't be of much help.
Out of curiosity, did you format the hard drive and reinstall an OS on this new machine or are you using it "as is"?
I would do a clean install of windows. Often that's the only way to fix mysterious system errors. --Dave
Joined: Dec 06, 2001
I suggest an new OS install as well. If I bought a hand-me-down machine that's the first thing I would do, mostly because I don't want all their applications and data taking up space that I can use for my own apps and data.
Joined: Jan 22, 2006
I'm going to wipe the hard drive this weekend and re-install everyting.
I did get it working by copying the jdk directory from a friends machine. The install will not ever work, but a straight copy of the environment worked OK. Strange.
Thanks for the help.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com