Java API 源代码

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

Java API Source Code

javaapi

提问by Matt Robertson

Where can I find the source code of the Java API?

在哪里可以找到 Java API 的源代码?

采纳答案by zengr

OpenJDK code: Browse here
For example, if you looking for AWTUtilities.java, go here in the above link:

OpenJDK 代码:浏览此处
例如,如果您要查找 AWTUtilities.java,请转到上面链接中的此处:

src? share? classes? com? sun? awt? AWTUtilities.java
  1. OpenJDK project homepagewhere they have all the instructions of downloading and building it
  2. OpenJDK Mercurial Repo hosted here
  3. JDK Documentation here
  1. OpenJDK 项目主页,其中包含下载和构建它的所有说明
  2. OpenJDK Mercurial Repo 托管在这里
  3. JDK 文档在这里

回答by Thorbj?rn Ravn Andersen

Install the JDK. The sources for the public classes are packaged in src.zip.

安装 JDK。公共类的源代码打包在 src.zip 中。

回答by Marek Sapota

I'm not sure what you mean, but here is the API documentation

我不确定你的意思,但这里是API 文档

Source for OpenJDK implementation

OpenJDK 实现的源代码

回答by Jo?o Silva

You can also find them online at http://www.docjar.org/.

您还可以在http://www.docjar.org/在线找到它们。

回答by Steve-o

Presumably you mean the core libraries?

大概你的意思是核心库?

http://openjdk.java.net/groups/core-libs/

http://openjdk.java.net/groups/core-libs/

You might this alternative useful too:

您可能这个替代方法也很有用:

http://www.gnu.org/software/classpath/

http://www.gnu.org/software/classpath/

回答by Thomas

If you only need to look up some classes, the following page is also a good source:

如果你只需要查找一些类,下面这个页面也是一个很好的来源:

http://grepcode.com

http://grepcode.com

It works for different versions of various libraries.

它适用于各种库的不同版本。