java - 在哪里可以找到 Java API 代码

标签 java

我听说Java是开源代码。那么,我可以获得 Java API 编码方法吗?如果是这样,请告诉我在哪里可以获取 Java API 的源代码。

最佳答案

可以在JDK安装目录下的src.zip中找到。

来自Java docs :

Source Code:

(In src.zip) JavaTM programming language source files for all classes that make up the Java core API (that is, sources files for the java., javax. and some org.* packages, but not for com.sun.* packages). This source code is provided for informational purposes only, to help developers learn and use the JavaTM programming language. These files do not include platform-specific implementation code and cannot be used to rebuild the class libraries. To extract these file, use any common zip utility. Or, you may use the Jar utility in the JDK's bin/ directory:

jar xvf src.zip

关于java - 在哪里可以找到 Java API 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2407206/

相关文章:

java - 了解快速排序语法

java - 更新现有的 Yaml 文件

java - 如何重构错误移动字段类型?

java - 使用 PDFBox 在背景中创建渐变

java - 为 Android 应用程序构建服务器

java - 每次我的 JSlider 移动时都会出现 JDialog

java - 重写 JFrame.setBackground() 时遇到问题

java - 基于角色的访问控制

java - Firebase 无法显示实时数据库中的名称

java - 无法从 intellij idea 运行 junit-5 测试用例