I broke Java on my Mac!

I’ve been out of the Java scene for a while (sadly) until just recently when I tried to pick back up on some Applet work. Things were going ok I suppose until all of a sudden I got this in my Java Console:


2007-10-20 22:10:48.266 firefox-bin[303] Invalid memory access of location 6d005100 eip=90a59387
Oct 20 22:10:48 computer /Applications/Firefox.app/Contents/MacOS/firefox-bin: An unexpected Java error has been detected by HotSpot Virtual Machine.
Oct 20 22:10:48 computer /Applications/Firefox.app/Contents/MacOS/firefox-bin: If this error is reproducible, please report it with the following information: 

I was very sad and confused because I thought, well goodness I don’t think I’m even capable of writing code that would access invalid memory using Java so there don’t seem to be many places to turn. I tried Safari, same problem. I tried Pogo.com applets, same problem. It didn’t happen EVERY time but at seemingly random time periods after playing around with an Applet I would get this error. Interestingly enough I ran my code in the AppletViewer through Eclipse and I never got this error.

After a reboot and more testing, I tracked down the error log and it pointed me to http://bugreport.apple.com/ to post my error… and the site was busted. They actually had a bug reporting service FOR people who can’t log in so I filled that out. Then I found a download for the latest version of Mac Java and tried to run it… but it had an invalid checksum and wouldn’t mount. I figured the file corrupted in the download and re-downloaded twice more. No success. I downloaded the previous version, same problem, bah!!

I did some research on this issue and apparently this USED to happen sometimes and then Apple fixed it and released an update… which I have. At this point I’m realizing this is very much not my day. Then I found a workaround to load the file using Disk Utility and to mount it by ignoring the checksum. Then I run the install and it fails (guess I can’t be too surprised) and it broke my installation of Java! Now I have no Java at all.

I got a Mac because I was tired of things always breaking on Windows and for almost a whole year everything has been butter smooth. Now all in one day I feel like my machine is falling apart! What should I do? Is my machine itself somehow busted? Do I need to reinstall OSX? Thanks to anyone who can help me out.

When I have invalid files on Windows, I run Scan Disk. It checks your hard drive for errors and corrupt files. Maybe you should try running a similar disk checking program on your Mac.

I’ve “fixed” people’s computers by having them run Scan Disk before.

Disk Utility would be that tool. I had to boot up with my Mac dvd to run it on my startup disk and it did in fact find some problems. It repaired them for me, I re-downloaded the file (the version I had still was messed up), and the installation worked! I’m back in Java. Thanks for the good tip :slight_smile: