Java source files can be downloaded from Sun. There are archived in "jar" files. For instance, the file "src.jar" contains all the sources for the basic language.
On unix machines, you can list all the files in src.jar by doing
% jar -tvf src.jar -- the list of files is very very long % jar -tvf src.jar src/java/lang -- list only the files under src/java/lang
To extract the files in src.jar:
% jar -xvf src.jar src/java/lang/Integer.java -- the extracted file "Integer.java" will have the correct directory structure % jar -xvf src.jar src/java/lang/ -- extracts everything under src/java/lang