Java 如果我想要我的 Mac 的 JDK,我应该在哪里寻找它?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2522430/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 08:47:46  来源:igfitidea点击:

If i want the JDK for my Mac, where should I look for it?

javamacos

提问by wolverine

I want Java to be installed on my Leopard MacBook, but I couldn't find the JDK kit for Mac on Sun's Java site. Where should I look for it?

我想在我的 Leopard MacBook 上安装 Java,但我在 Sun 的 Java 站点上找不到适用于 Mac 的 JDK 工具包。我应该在哪里寻找它?

采纳答案by Mark

The JDK is already installed on Mac OS X 10.5. If you go to /Applications/Utilities you will see Java Preferences. There you can select between the versions of Java you would like to use, including version 6 (6 is only 64-bit so if you have a 32-bit Core Duo Macbook you'll have to use SoyLatte).

JDK 已安装在 Mac OS X 10.5 上。如果您转到 /Applications/Utilities,您将看到 Java Preferences。在那里,您可以选择要使用的 Java 版本,包括版本 6(6 仅是 64 位,因此如果您有 32 位 Core Duo Macbook,则必须使用SoyLatte)。

alt text http://img121.imageshack.us/img121/4249/javapref.jpg

替代文字 http://img121.imageshack.us/img121/4249/javapref.jpg

回答by Thilo

It comes with the OS.

它随操作系统一起提供。

Try "java -version" in Terminal.

在终端中尝试“java -version”。

Apple is maintaining this version, not Sun. It gets updated using Software Update, and there may be downloads (for beta versions) at the Apple Developer Connection site.

Apple 正在维护此版本,而不是 Sun。它使用软件更新进行更新,Apple Developer Connection 站点上可能有下载(测试版)。

回答by Michael Aaron Safyan

You need to install the Xcode developer tools. The JDK is included there. Before you do that, though, you can check if it is already installed by using javac -version. To find out where it is located, you can run the command which javac, although it will most likely be a symlink to somewhere else.

您需要安装Xcode 开发人员工具。JDK 包含在那里。但是,在执行此操作之前,您可以使用javac -version. 要找出它所在的位置,您可以运行命令which javac,尽管它很可能是指向其他地方的符号链接。

回答by radekg

You may want to try soylatteor openJDK from Mac Ports . Also, Apple has download section of java too ( http://developer.apple.com/java/download/) you didn't tell what architecture you are using which has some impact.

您可能想从 Mac Ports尝试soylatte或 openJDK。此外,Apple 也有 java 的下载部分(http://developer.apple.com/java/download/),您没有告诉您正在使用哪种架构,这会产生一些影响。

回答by j-beda

OpenJDKseems to be the ultimate source for anyone who doesn't want to run in to licensing issues. I understand Oracle's version is derived from OpenJDK.

OpenJDK似乎是任何不想遇到许可问题的人的最终来源。我知道 Oracle 的版本是从 OpenJDK 派生的。

Installers for macOS can be found at https://adoptopenjdk.net/

macOS 的安装程序可以在https://adoptopenjdk.net/找到