Location of 1.5.x JDK source code

别说谁变了你拦得住时间么 提交于 2020-01-14 12:48:11

问题


I have installed Eclipse 3.3 on Mac OS X and it does not contain the src.zip file I am used to seeing with Windows and Linux installations. Where can I download the complete source code for the Java 1.5 JDK (must be specific versions).

I have been able to locate the full source code, however it contained the ungenerated Buffer implementations and so navigating NIO code was not possible.

Looking for the Java source typically found in the JDK src.zip, not the VM source.


回答1:


You can get the Developer Documentation, which includes the source. The download requires you to have an ADC account.




回答2:


Brian Clapper has already mentioned it in a comment, but the JDK downloads from Sun include src.zip. I don't know if there's any way to get it other than installing on a target platform, but you can install it on a Windows or Linux (virtual) machine and get src.zip from there.

Specifically for Java 1.5, the downloads are here

[Update] Also, source distributions of the JDK are available from Sun from here. It seems that SCSL link is messed up and throws you for a loop, but JRL still works (if you don't mind going through it).




回答3:


It is located in

/System/Library/Frameworks/JavaVM.framework/Versions.1.5.0/Home/src.jar

I do have the XCode stuff installed found on the installation disks that come with a Mac, so I don't know if the source code appears on a standard Mac installation of OSX.




回答4:


/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar

More details on: http://confluence.concord.org/display/CCTR/Get+local+copies+of+Mac+OS+X+Java+source+code+and+Javadoc




回答5:


Unclear if that is even possible since the Mac JDK is not, to my knowledge, open source. It was created by Apple not Sun.



来源:https://stackoverflow.com/questions/440441/location-of-1-5-x-jdk-source-code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!