Viewing the source of ideas and code specification is an important means of learning to improve the ability of code writing.
sometimes we meet you want to see the implementation of classes and methods in a jar package, but you cannot view them.
This is because the source code for the jar package is not loaded. Just find the source of the jar package and set the path so you can view it.
Source Download
Source download needs to be in accordance with the version of the good, can be zip or jar package.
Here are a few find the source of the site, you can also go to the jar package of the official website to find.
GitHub
Https://github.com/openjdk-mirror/jdk7u-jdk
SourceForge
Https://sourceforge.net/projects/jdk7src/?source=directory
Add Source
Here are three ways to add source code:
add from Source not found page
add from Project BuildPath
maven Auto-add
If you already use Maven to manage jars, the packages under Maven can easily download the source code yourself. Point to see which automatic only need to change the settings.
If you don't know about Maven, you can see
Maven Introduction
The MAVEN settings automatically download the source code as follows:
Only need to tick windows-preferences-maven-download Artifact sources.
PS: This document contains the package in the project Source view method, as for external projects, such as Tomcat server source code is a complete project, find the source code after loading into a project can be viewed.
Java Advanced (vi)------SOURCE Learning---myeclipse how to view the source of the jar package