Skip to main content

How to obtain source code (stupid question)

3 replies [Last post]
losangeles
Offline
Joined: 2005-10-06

Hello,

I just have a stupid question. I'd like to get the source code of mustang, but I can only get the source snapshots e.g. jdk-6_0-ea-src-b53-jrl-22_sep_2005.jar and I can't get it to work and I don't have the tools that are needed to build it etc. I only want the files, that contain the source of the different Classes, Intefaces, etc. just as in previous versions of JDK that included a src directory. Is this somehow possible?

Please forgive me for this question.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
peterkessler
Offline
Joined: 2004-10-27

What you do with a snapshot like jdk-6_0-ea-src-b53-jrl-22_sep_2005.jar is to run it. E.g.,
[code] $ java -jar jdk-6_0-ea-src-b53-jrl-22_sep_2005.jar[/code] and that will extract the source for that build of the JDK. That way you get not only the public API sources that are in src.zip, but also all of the implementations, e.g., in j2se/src/share/classes. You also get all the source code for the native libraries and the virtual machine. Have fun!

losangeles
Offline
Joined: 2005-10-06

I know it's been a while.

I just wanted to thank you for your answers!

abies
Offline
Joined: 2003-06-10

Download a binary jdk release - it has a src.zip in main directory, there you will find sources for all official java classes.