Source code for the Java library classes

后端 未结 8 1074
旧时难觅i
旧时难觅i 2020-12-13 13:31

Where can I find the source code for the Java library classes? I mean classes in rt.jar.

Platform: Windows.

相关标签:
8条回答
  • 2020-12-13 14:21

    Sources are in src.zip located in the installation folder:

    • On Windows, the JDK includes src.zip by default if I remember well.

    • On a Linux distro, you may have to install the sun-java6-source package.

    • On Mac, you'll have to download the Developer Documentation. Have a look at this answer.

    0 讨论(0)
  • 2020-12-13 14:22

    Here's the browsable source code for OpenJDK 7.

    Update: As of June 2018 grepcode seems to be down. Here you can find an alternative.

    Update^2: As of October 2020, the two previous links do not work. View it at OpenJDK and vote up the answer by Nosrep, which I got it from.

    0 讨论(0)
提交回复
热议问题