macos 在 Mac 操作系统上安装 Java 6
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/607945/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing Java 6 on Mac OS
提问by Abdullah Jibaly
Is it possible to install the latest JDK on Mac OS 10.5? What are the best options, considering that the Apple-supplied version is 1.5?
是否可以在 Mac OS 10.5 上安装最新的 JDK?考虑到 Apple 提供的版本是 1.5,最好的选择是什么?
Update:I am trying to install JDeveloper 11, which requires JDK 6.
更新:我正在尝试安装需要 JDK 6 的 JDeveloper 11。
回答by Jarret Hardie
If you have an Intel Mac with a Core 2 Duo, go to Applications/Java and run Java Preferences.app
如果您有配备 Core 2 Duo 的 Intel Mac,请转到 Applications/Java 并运行 Java Preferences.app
You'll be able to select "Java SE 6" as your default java version (version 5 is still the shipping default on the OS for compatibility, I guess).
您将能够选择“Java SE 6”作为您的默认 Java 版本(我猜,版本 5 仍然是操作系统上默认的兼容性版本)。
回答by Fabian Steeg
Depending on your hardware the latest versionApple supplies actually is Java 6, but it is not activated as the default version to use. Apple supplies Java 6 only for 64-bit Intel Macs (i.e. not for original Core Duo Macs). For older Macs, you could try the OpenJDK port of Java 6 for Mac(SoyLatte).
根据您的硬件,Apple 提供的最新版本实际上是 Java 6,但它没有被激活为要使用的默认版本。Apple 仅为 64 位 Intel Mac 提供 Java 6(即不适用于原始 Core Duo Mac)。对于较旧的 Mac,您可以尝试使用Java 6 for Mac(SoyLatte)的OpenJDK 端口。
回答by Marcus Adams
Apple provides Java 6 (1.6) for Leopard (OS X 10.5) as an update, however only the 64-bit version. So, if your Mac is not a 64-bit Intel, then you won't have Java 6 on Leopard.
Apple 为 Leopard (OS X 10.5) 提供 Java 6 (1.6) 作为更新,但只有 64 位版本。因此,如果您的 Mac 不是 64 位 Intel,那么 Leopard 上不会有 Java 6。
If you do have a 64-bit Intel, then ensure that you install the latest OS updates, especially the Java ones to make sure you get Java 1.6. Also, you still need to set Java 6 as the default VM in your Java Preferences, as it defaults to Java 1.5.
如果您有 64 位 Intel,请确保安装最新的操作系统更新,尤其是 Java 更新,以确保您获得 Java 1.6。此外,您仍然需要在 Java 首选项中将 Java 6 设置为默认 VM,因为它默认为 Java 1.5。
Currently, the easiest solution if you have a 32-bit Intel processor is to upgrade to Snow Leopard, which includes 32-bit and 64-bit versions of Java 6.
目前,如果您拥有 32 位 Intel 处理器,最简单的解决方案是升级到 Snow Leopard,其中包括 32 位和 64 位版本的 Java 6。
回答by cesarggf
JDeveloper like netbeans and eclipse provide a configuration file(usually a .conf) where you can update a jdkhome attribute addresing the path of your jdk6 installation, as mentioned before you can get it from OpenJDK port of Java 6 for Mac.
像 netbeans 和 eclipse 这样的 JDeveloper 提供了一个配置文件(通常是 .conf),您可以在其中更新 jdkhome 属性,该属性地址您的 jdk6 安装路径,如前所述,您可以从Java 6 for Mac 的 OpenJDK 端口获取它。
回答by Alejandro Hdz
You also need to be aware that:
您还需要注意:
- if you have an alias "CurrentJDK" and if that alias is "broken" then you must delete it to install a new JDK.
- Deleting that "alias" will solver troubles.
- 如果您有一个别名“CurrentJDK”并且该别名“已损坏”,那么您必须删除它才能安装新的 JDK。
- 删除那个“别名”将解决问题。
回答by JosephStyons
OS X does have Java 6after Update 1. The version number you are referring to is the version ofJava 6. Do you receive any errors while installing JDeveloper 11?
更新 1 后,OS X 确实有 Java 6。您所指的版本号是Java 6的版本。您在安装 JDeveloper 11 时是否收到任何错误?
回答by Charlie Martin
回答by Stiropor
It is. Check here: Apple support
它是。在此处查看:Apple 支持