I want to know where are the java API's stored. I use openJDK 7. I want to edit some of the code of a class to suit my needs and therefore I want to know where are these API's stored. Can anyone please answer this question?
To get the source code, run (as a regular user, not root)
apt-get source openjdk-7-jre
It will download the source tree used to generate all the openjdk-7 packages. It downloads it to your current directory, so you may want to run something like
mkdir -p ~/src && cd ~/src first.
The compressed archive
jdk-dfsg.tar.gz at the root of the source tree appears to contain all the standard classes.
You might need to enable source code repositories: