Where does Java keep standard library classes like java.util.* on the hard drive under Windows OS?
3 Answers
When you say
import java.util.Date;
you are not reading a file. You are telling the compiler to treat the type reference "Date" as if it was "java.util.Date".
When the compiler later resolves java.util.date it will find it in the JDK's jre/lib/rt.jar file.
http://www.velocityreviews.com/forums/t125842-re-newbie-q-where-is-java-util.html

- 1,001
- 1
- 12
- 30
If you are looking for the source code, you can find the source code online as described here:
Where to find Java JDK Source Code?
Additionally, you can find it within the src.zip file:
E.g. my own computer this is the:
C:\Program Files\Java\jdk1.7.0_01\src.zip
The actual compiled classes are contained with the **lib/rt.jar file that the compiler and jvm uses.
In the JDK1.X.X... directory there is a zip file named src.zip. unzip it and have a look. you might want to make a copy of it and move it to another directory before you do it.

- 11
- 1