How to find the source file associated with the jar package in eclipse

Source: Internet
Author: User

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.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.