Open a previous project with eclipse today, and you can see a jar package referenced by the project.Source codeI'm curious to see the source associated with the jar package.Code. The results were not found in every corner of eclipse. The reason was not found until the file location was found by using the find command. By the way, make a summary.
In eclipse, we can see that the source code of the jar package can be divided into the following three situations:
- Under normal circumstances, the source code corresponding to the jar package attach can be browsed normally. In this case, right-click the attribute on the jar package, and you can see the location of the corresponding source code under the Java source attachment tag in the pop-up window; you can also expand the jar package under Project Properties> JAVA build path> libraries, or you can see the location of the source code.
- In the second case (my situation today), the project itself is an ant project, and the jar package is compiled by downloading the source code. In this case, click the class under the jar package to view the source file. In the build directory of the project, you can find the source code of the jar package.
- The third case is that eclipse has installed decompilation plug-ins such as jadclipse. The source code is generated by decompilation and there is no actual corresponding file.