如何在 Mac OS X Snow Leopard 上重新安装 Java 6

发布于 2024-08-10 03:04:11 字数 286 浏览 9 评论 0原文

好吧,我是个白痴,在试图让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

浪推晚风 2024-08-17 03:04:11

这个答案晚了 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.

游魂 2024-08-17 03:04:11

以下stapes为我做到了:

  1. 此处下载Apple的Java6包
  2. 移动了文件夹/System/Library/ Java/JavaVirtualMachines/1.6.0.jdk 到 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.old 以进行备份
  3. 安装 dmg 并运行安装
  4. 新文件夹 /System/Library/Java/JavaVirtualMachines/1.6 .0.jdk 应该出现
  5. 删除 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk.old

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
饮湿 2024-08-17 03:04:11

完整的答案是其他人发布的帖子的混合体。

您必须将以下文件夹复制到安全位置进行备份,
一旦您将备份复制到其他地方,只需从原始目录中删除文件夹即可 - 因此,当您运行安装程序时,计算机会认为您没有安装它。

因此,将它们复制到安全位置,然后从以下位置删除原始文件:
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

吾家有女初长成 2024-08-17 03:04:11

跟进之前的建议:

我使用 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.

谁的新欢旧爱 2024-08-17 03:04:11

危急时刻需要采取危急措施

Desperate times call for desperate measures.

冷情 2024-08-17 03:04:11

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.

活泼老夫 2024-08-17 03:04:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文