The JDK source code is packaged in a src.jar, and should be in the JDK/Home folder. However, some JDK versions in Mac OSX didn’t include the source code or Javadoc.
The JDK source code is inside the src.zip, this article shows you how to get it on Windows, Ubuntu (Linux) and Mac OSX.
This article shows you how to attach the JDK source code in Eclipse IDE.
In Maven, you can get source code for project dependencies in most IDEs like this :
The following SQL shows you how to get the source code for a specified trigger :