Sometimes we need to check the source code of the referenced jar package, which can be achieved through simple configuration.
Prerequisites: Download the source code of the jar package to your computer.
Example: to view the source code of the struts2-core-2.2.1.1.jar as an example.
Download Struts-2.2.1.1 with source code from the Internet.
When a struts2-core-2.2.1.1.jar is referenced in a project, you can take actions to associate the struts2-core-2.2.1.1.jar with its source code.
Right-click the struts2-core-2.2.1.1.jar-> properties-> JAVA source attachment-> external Folder->
Find SRC \ core \ SRC \ main \ Java under the downloaded Struts-2.2.1.1, and click OK.
In addition, some jar download after the meeting and download its corresponding source code jar, such as commons-pool-1.6 after the download will have a commons-pool-1.6.jar, commons-pool-1.6-sources.jar, and commons-pool-1.6-javadoc.jar documentation,
Sources. jar can be directly added as the source code, the xxx-javadoc.jar documentation can also be added in javadoc location.
Apart from downloading the source code, some jar packages do not contain the source code after downloading them. It is troublesome to find the source code by yourself. This can be solved by decompilation !!
Myeclipse or eclipse configure Java decompilation plug-ins refer to the article http://blog.csdn.net/spring292713/article/details/7803839