This post has been edited by 333OnlyHalfEvil: 18 June 2009 - 10:59 AM
Java API Source Code
Page 1 of 19 Replies - 1833 Views - Last Post: 11 November 2009 - 09:43 AM
#1
Java API Source Code
Posted 18 June 2009 - 10:59 AM
Why doesn't Sun Microsystems have the source code in the Java API? Is there a website that has it?
Replies To: Java API Source Code
#2
Re: Java API Source Code
Posted 18 June 2009 - 11:33 AM
When you install the JDK, there is a folder, probably in your Program Files directory (if you're using Windows), called Java. In the Java directory, there will probably be a folder. (possibly more if you have upgraded) That folder will probably start with something along the lines of jdk1.X.X_XX. If you go into that folder...there will be a zipped folder called src. Unzip it somewhere, I kept it in the same jdk1.X.X_XX folder, but created a SOURCE folder. Then you can look at the source code for all of the standard Java classes. 
Hope this helps!
Hope this helps!
#3
Re: Java API Source Code
Posted 18 June 2009 - 11:35 AM
It's a lot of fun to dig around in there.
#5
Re: Java API Source Code
Posted 18 June 2009 - 03:39 PM
KYA, on 18 Jun, 2009 - 12:35 PM, said:
It's a lot of fun to dig around in there.
That quote...yeah...that's what she said. </off-topic>
I know, right? One day, I was just wondering if I could get the source code somehow...so I did a little searching and found that all the classes are there, but you just have to unpack 'em.
This post has been edited by Locke: 18 June 2009 - 03:43 PM
#6
Re: Java API Source Code
Posted 18 June 2009 - 03:42 PM
Thanks, that helps out a lot.
#7
Re: Java API Source Code
Posted 25 June 2009 - 06:04 AM
Actually if you are using Eclipse you don't even have to unpack them. You can point eclipse to the source code zip/jar when you setup your JDK and then whenever you have a question about how Sun did something you just put the cursor on that class and hit F3.
I thought this was the neatest *feature* of BEA workshop (which is Eclipse based) until I was following the install directions for some library and learned that it was a feature of Eclipse in general.
Also installing a java disassembler such as JAD is a pretty good idea. Sometimes organizations are paranoid and obfuscate their classes but more often than not they don't -- so if you ever need to get some info on a proprietary class then JAD works wonders (and if they left debugging info in the file you will even get the original naming).
I thought this was the neatest *feature* of BEA workshop (which is Eclipse based) until I was following the install directions for some library and learned that it was a feature of Eclipse in general.
Also installing a java disassembler such as JAD is a pretty good idea. Sometimes organizations are paranoid and obfuscate their classes but more often than not they don't -- so if you ever need to get some info on a proprietary class then JAD works wonders (and if they left debugging info in the file you will even get the original naming).
#8
Re: Java API Source Code
Posted 25 June 2009 - 06:12 AM
%JAVA_HOME%\jdk1.6.0_14\src.zip
Or whatever version JDK you have installed.
Or whatever version JDK you have installed.
#9
Re: Java API Source Code
Posted 07 November 2009 - 03:13 PM
Also, Sun has a downloadable FIle that contains the API as offline webpage. So even when you do not have internet you can just double click each class and it will show the API.
My Contributions->Java API -> Link to the File
I make good use of that like when I am at work and need to look at the API. (Am not allowed to have internet at work on the computers, Laptop ftw, no wireless/direct internet ftl.)
My Contributions->Java API -> Link to the File
I make good use of that like when I am at work and need to look at the API. (Am not allowed to have internet at work on the computers, Laptop ftw, no wireless/direct internet ftl.)
#10
Re: Java API Source Code
Posted 11 November 2009 - 09:43 AM
What I did is to download the source code of OpenJDK. For tricky things I can have a look at the implementation of the JDK.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|