First, the source code added
Your JDK installation directory under the%java_home%/src.zip file is the source code, unzip the corresponding package to find the following class can be.
If it is Eclipse development, ctr+ Mouse left click, can not appear source, in the pop-up view click Attach Source, select Src.zip can.
Second, API add
JDK API Documentation
Java SE 8 API Documentation:
Http://www.Oracle.com/technetwork/Java/javase/documentation/jdk8-doc-downloads-2133158.html
Jdk-8-apidocs Online version:
Http://docs.oracle.com/javase/8/docs/api/index.html
Java SE 7 API Documentation:
Http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html
Steps:
1.http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html URL Download API documentation to place the document in the JDK's home directory
2. Click eclipse-window-preferences-java-installed jres-edit
3. Under Rt.jar, double-click Javadoc location
4. Select the API zip file that we just downloaded under JDK Home and click OK to finish.
5. On the class page, open the shortcut key SHIFT+F2 to open the API documentation for the corresponding class.
"Eclipse use" method for adding source files and APIs in eclipse