When using eclipse for development, especially when a third-party jar package is added, You can conveniently view the source code and API instructions of the jar package, I believe this will be of great help to our coding.
I did not do this until today. To save trouble, I have always used a Jad decompilation plug-in. However, the decompilation code of this tool cannot see annotations and the format is messy. Today's sudden rise decided to associate the source code and instructions of the jar package
The procedure is as follows:
1. Press Ctrl + the left mouse button and click the class to view the source code (as shown in the interface). Click attach source to select the jar package source file or zip package.
2. Right-click the project and choose properties. The following window appears (check the red mark) to add the source code and API document files.
The operation methods of myeclipse and eclipse or different versions may be different. If the above method does not work, please refer to the following URL:
Http://blog.sina.com.cn/s/blog_59e0c16f0100yat2.html
Http://www.blogjava.net/coderdream/archive/2008/05/29/203839.html
Http://www.2cto.com/kf/201302/189144.html
Add a little bit of knowledge:
View the source code of a class or method in eclipse -- Ctrl + left mouse button -- F3
View the API documentation for classes or methods in eclipse -- Shift + F2