Before looking at the online view of the source code method, view the JDK, just know it does not know why.
Later found that if you look at other source code, always see failure.
Start each time you click the attach source package to see the source of the jar package, but this is still the case.
But it's still the wrong one.
This does not understand, also associated with the compression package Ah, how can not see it.
View online discovery, it is not directly related to the class file to refer to the package,
There are two types of packages:
A special storage. java file, this is the source package, you can view the source code through it.
One is to store the. class file, which is used for the class reference in development.
If you do not look at the source code, direct reference. Class This jar package is OK, to view the source code, you need to associate storage. Java source code package.
Here to view MyBatis source code For example, view the source code.
1, go to download page: https://github.com/mybatis/mybatis-3/releases
2, the page is divided into two kinds of packages, Mybatis-3.4.6.zip is the package to be referenced in the development. To view the source, download the following source code package, and use the. zip package here.
First extract the Mybatis-3.4.6.zip, the jar file inside is to refer to the jar package.
3. Paste into the project under this directory:
4, next you need to add the package to the source file. There are two ways of doing this:
The first type:
Because we have put in the Lib directory here, so choose Add JARs on the line, if not put, you can choose the following add External JARs
We'll have this file in the libraries.
When you are sure, you will be given more of this directory:
The second way:
Right-click Project-properties
The next step is the same as above.
5, this time if we want to see a file source code, it will be:
6, add the source code, there are two ways:
The first type:
Select the Zip package that contains the. Java: Mybatis-3-mybatis-3.4.6.zip
The second way:
Go back to the Java Build path page, select Sourceattachmetn, click Edit
Select the source package on the line.
Effect:
Eclipse View Source Failure summary