jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes How to view source code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to view source code" Watch "How to view source code" New topic

How to view source code

Asuthosh Borikar
Ranch Hand

Joined: Sep 29, 2000
Posts: 75
I have JDK 1.2.1 installed on my computer. How do I see the source code for all the classes and interfaces? Any help will be appreciated.
Peter Tran

Joined: Jan 02, 2001
Posts: 783
In the directory that you installed the jdk, (e.g. c:\jdk1.2.1) you should see a src.jar file. If you unzip or unjar this entire jar file, you'll see all the java files for all the classes and interfaces.
Neeraj Vasudeva

Joined: Feb 07, 2001
Posts: 12
Can I safely delete this jar file, or is there any disadvantge of deleting it ?
Come to my site... www.sunjavacertification.com & explore the things..i am a new bie in java.
(edited by Cindy to get link to work)
[This message has been edited by Cindy Glass (edited February 16, 2001).]

Come to my site...http://www.sunjavacertification.com & explore the things..i am a new bie in java.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Someday you are going to want to subclass one of the classes in the JFC. Then you are really going to be sorry that you can't find the SRC file so that you can read the code.
Course you can download it again from SUN - so no irrepairable damage.
PS, your site looks nice - but a bit slow - I gave up after a while. Maybe I'll try again later.

"JavaRanch, where the deer and the Certified play" - David O'Meara
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: How to view source code