How to REINSTALL Java 6 on Mac OS X Snow Leopard

26.2k views Asked by At

OK, I am idiot and messed with my Java install trying to get Resin to work.

Now, things are broken. I figured I could just reinstall the developer tools that came with my new Mac (brand new 13" MacBook Pro) and that would take care of it.

Alas, I was wrong. Snow Leopard comes with Java 6 JRE and JDK but as far as I can tell YOU CANNOT EVER REINSTALL just Java, you have to reinstall the OS.

Do any Gurus on S.O. know if this is the case or, better yet, what the steps are to reinstall Java 6 back to the factory settings without reinstalling the OS?

8

There are 8 answers

0
Chris Williams On

Snow Leopard's installer is smart enough to reinstall OS stuff and leave your prefs/files alone. Just pop in the SL DVD and it'll detect that SL is already installed and ask if you want to re-install. It should also install in such a way that 10.6.1 will still be intact after the install. I'm not 100% sure but I'd assume it will reinstall the Java frameworks as well.

Make sure you have a backup first.

1
lemotdit On
1
alphazero On

Desperate times call for desperate measures.

0
jmalin On

Following up on an earlier recommendation:

I had success re-installing System/Library/Frameworks/JavaVM.framework on macOS High Sierra using a combination of Pacifist (www.charlessoft.com) and the High Sierra installer app that's freely available from the App Store.

When you download the installer app, do NOT continue the install! Quit the program after it starts, then run Pacifist against the app. The "Core" part of the package contains the System/Library/Frameworks/JavaVM.framework directory you want.

I did this because many apps such as IntelliJ IDEA 2018 expect files to be in /System/Library/Frameworks/JavaVM.framework. It's much easier to restore that directory than do a bunch of symbolic links, etc.

Thank you, Tiago Espinha for about 99% of this. All I am doing is pointing out how to get a free High Sierra image.

0
Turner Technician On

the full answer, is a mixture of the posts other people have put up.

you have to copy the following folders to a safe location for back up, and once you have the back up copied elsewhere, just delete the folders from thier original directories - thus the computer thinking you dont have it installed when you run the installer.

So, copy these to a safe location, and then delete the originals from: 1: System/Library/Java 2: System/Library/Frameworks/JavaVM.Framework 3: Library/Java

(number 3 is just on the root of your Mac Hard Drive) Just followed the above steps on Snow Leopard 10.6.8 and worked like a charm

0
purplemonkeydishwasher On

http://code.google.com/p/googleappengine/issues/detail?id=4712 worked for me to roll back Java Update 4 to Update 3. See commend #39.

0
Martin Sturm On

Following stapes did it for me:

  1. Download Apple's Java6 package from here
  2. Moved the folder /System/Library/Java/JavaVirtualMachines/1.6.0.jdk to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.old for having a Backup
  3. Mount the dmg and run the installation
  4. A new folder /System/Library/Java/JavaVirtualMachines/1.6.0.jdk should appear
  5. Remove /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.old
0
Tiago Espinha On

This answer comes 3 years late and is most likely useless for the original poster. I will, however, leave it here for future reference.

When this happens, you don't have to reinstall the whole OS thanks to a very neat tool called Pacifist. Pacifist allows you to reinstall pkg files regardless of any OS restrictions. This means that if you download the latest Java for OSX .dmg file and use Pacifist to install it, all the Java files will be overwritten and everything will be back to a working state.

I had a similar problem and this did it for me.

You can find Pacifist here: http://www.charlessoft.com/

Please note: it's a commercial application (shareware for $20) and I am in no way affiliated with it or its developers. You can also "try it out" for free.