简体   繁体   中英

How to REINSTALL Java 6 on Mac OS X Snow Leopard

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

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.

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

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

绝望的时代呼吁采取绝望的措施

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.

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.

http://code.google.com/p/googleappengine/issues/detail?id=4712让我将Java Update 4回滚到更新3.请参阅#39。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM