sixxvirus
sixxvirus

Reputation: 39

Source code for java.lang.Object

Is there any web site that I could see the source code for the Java standard library? Most so the two classes java.lang.* and java.net.* ??

Upvotes: 1

Views: 9156

Answers (4)

user1112699
user1112699

Reputation: 197

Please install Java JDK (Java Developer Kit), which is not the same as Java JRE (Java Runtime Environment).

The Java JDK contains the Java source code.

And you'd better to use an IDE (Integrated Development Environment) such as Eclipse or NetBeans to develop Java programs.

You can look for the java code via the IDE tool.

Upvotes: 4

fiveobjects
fiveobjects

Reputation: 4289

Java source code is available in JDK distribution. If you have installed JDK on your machine, in JDK directory you'll find src.zip. For example, in my windows machine source code is available at: C:\Program Files\Java\jdk1.6.0_12.

Alternatively, you can find Java source code online at: Java Source Code

Thanks, Mrityunjoy

Upvotes: 0

Thomas Uhrig
Thomas Uhrig

Reputation: 31603

Of course. You could find it in the JDK, but also online. I also use the online version, because I find it faster as to open the folder with the JDK, brows through all the files and so on. Just google "java source object".

http://www.docjar.com/html/api/java/lang/Object.java.html

Upvotes: 3

David Oliván
David Oliván

Reputation: 2725

You need the JDK (JAVA SDK) installed and source of class library is at (on Windows):

C:\<Program Files>\Java\<JDK>\src.zip

Like

C:\Program Files\Java\jdk1.7.0\src.zip

Upvotes: 1

Related Questions