This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to view source code" Watch "How to view source code" New topic
Author

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
Bartender

Joined: Jan 02, 2001
Posts: 783
Asuthosh,
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.
-Peter
Neeraj Vasudeva
Greenhorn

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"
Sheriff

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to view source code
 
Similar Threads
Given a URL, how could I read the html Source code?
glassfish source code
Hiding Source Code
Exception trying to play audio file
How to display Java API source code in Eclipse