如何在 Mac OS X Snow Leopard 上重新安装 Java 6
好吧,我是个白痴,在试图让 Resin 工作时搞乱了我的 Java 安装。
现在,一切都被打破了。我想我可以重新安装我的新 Mac(全新 13 英寸 MacBook Pro)附带的开发人员工具,这样就可以解决这个问题。
唉,我错了。Snow Leopard 附带了 Java 6 JRE 和 JDK,但就目前而言我可以告诉你,你不能只重新安装 Java,你必须重新安装操作系统,所以
任何专家都知道是否是这种情况,或者更好的是,在不重新安装操作系统的情况下将 Java 6 重新安装回出厂设置的步骤是什么。 ?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
这个答案晚了 3 年,对于原始发布者来说很可能毫无用处。不过,我会将其留在这里以供将来参考。
当发生这种情况时,由于有一个名为 Pacifist 的非常简洁的工具,您不必重新安装整个操作系统。 Pacifist 允许您重新安装 pkg 文件,而不受任何操作系统限制。这意味着,如果您下载最新的 Java for OSX .dmg 文件并使用 Pacifist 进行安装,所有 Java 文件都将被覆盖,一切都将恢复到工作状态。
我有一个类似的问题,这对我来说是这样的。
您可以在这里找到 Pacifist:http://www.charlessoft.com/
请注意:它是一个商业应用程序(共享软件售价 20 美元),并且我与它或其开发者没有任何关系。您还可以免费“试用”。
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.
以下stapes为我做到了:
Following stapes did it for me:
您有 Leopard util 磁盘吗?
http://www.macosxhints.com/article.php?story=2009051215025819
Do you have the Leopard util disk?
http://www.macosxhints.com/article.php?story=2009051215025819
完整的答案是其他人发布的帖子的混合体。
您必须将以下文件夹复制到安全位置进行备份,
一旦您将备份复制到其他地方,只需从原始目录中删除文件夹即可 - 因此,当您运行安装程序时,计算机会认为您没有安装它。
因此,将它们复制到安全位置,然后从以下位置删除原始文件:
1:
系统/库/Java
2:
系统/库/框架/JavaVM.Framework
3:
Library/Java
(数字 3 位于 Mac 硬盘的根目录下)
只需在 Snow Leopard 10.6.8 上执行上述步骤即可,效果非常好
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
跟进之前的建议:
我使用 Pacifist (www.charlessoft.com) 和 High Sierra 安装程序的组合在 macOS High Sierra 上成功重新安装了
System/Library/Frameworks/JavaVM.framework
可从 App Store 免费获取的应用程序。下载安装程序应用程序后,不要继续安装!程序启动后退出,然后针对该应用程序运行 Pacifist。包的“核心”部分包含您想要的 System/Library/Frameworks/JavaVM.framework 目录。
我这样做是因为许多应用程序(例如 IntelliJ IDEA 2018)希望文件位于
/System/Library/Frameworks/JavaVM.framework
中。恢复该目录比执行一堆符号链接等要容易得多。感谢 Tiago Espinha 完成了大约 99% 的工作。我所做的只是指出如何获得免费的 High Sierra 图像。
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.
危急时刻需要采取危急措施。
Desperate times call for desperate measures.
Snow Leopard 的安装程序足够智能,可以重新安装操作系统内容并保留您的首选项/文件。只需插入 SL DVD,它就会检测到 SL 已安装并询问您是否要重新安装。它还应该以这样的方式安装,即安装后 10.6.1 仍然完好无损。我不是 100% 确定,但我假设它也会重新安装 Java 框架。
首先确保您有备份。
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.
http://code.google.com/p/googleappengine/issues/detail ?id=4712 帮助我将 Java 更新 4 回滚到更新 3。请参阅推荐 #39。
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.