Pippo
Pippo

Reputation: 1583

Where to find the code of a standard Java class?

For example, I would like to see the code of the class Line2D in the package java.awt.geom. How can I find it?

Upvotes: 1

Views: 70

Answers (3)

RinaldoDev
RinaldoDev

Reputation: 995

If you have JDK, it's a file named src.zip inside JDK root folder.

Common 32bits location:

C:\Program Files (x86)\Java\jdk<version>\src.zip

Upvotes: 0

Captain Giraffe
Captain Giraffe

Reputation: 14705

You have one implementation at OpenJDK http://download.java.net/openjdk/jdk6/

Upvotes: 0

Rohit Jain
Rohit Jain

Reputation: 213281

Go to jdk home folder. There will be a folder named src. In that you will get source code of all the inbuilt java classes.

C:\Program Files\Java\jdk<version>\src\java\awt\geom\Line2D.java

Probably you might be having src.zip folder. You can unzip it.

Upvotes: 4

Related Questions