Troubleshoot third-party libraries under eclipse unable to navigate source code

Source: Internet
Author: User
Tags log4j

Write in front (nonsense): Eclipse can not navigate the code, there is a lot of possibilities, here we only discuss in the reference to third-party library can not navigate, is a very simple case, but the search ability seems to be not too good, did not find sharply's plan, so he studied it.

Body:

Well.. May is almost over, do not send a point what will appear not to love learning the same (hehe, who Cares?).

A recently completed project to go online, relatively idle a little (in fact, you have been very busy?!) What's with the UNIX network programming on your desk? ), just a few students in the team will be looking for Java related work (I はリーダー, although the intention to develop language taste, but never give a person to instill any of this value), so with a few Java powder (I started with C + +, Now is a variety of powder (anyway I would not admit it is soft powder, although I really am.) ) starts the job-oriented Project .

To do the project, of course, remember the habit of logging, the initial decision to use log4j.

Angry download, and in the project after the reference, it is normal to use, but we want to easily view the source code, will display the content shown, tell us not to find the source code.

Because the directory of your third-party libraries Eclipse doesn't know where it is, so you don't have to search for the source code yourself, you have to pack your source code and let eclipse know where the path is.

Click the Attach Source button, pop up the selection box, then point to External location

A pop-up selection box lets you choose a jar or ZIP package, where we package the log4j source with the shell's zip command, and let Eclipse know the path to the package.

Please use ctrl+alt+t to open your shell and enter

Zip-r Yourlog4jlocation/src/main/java Src.zip

Generate a new Src.zip file (located in Yourlog4jlocation/src/main/java) Next Select this src.zip in the previous box.

The end of the matter on the sauce of aunt and son:

To see the source attachment at the bottom of the jar you are referencing, the path is displayed.

Finished, the Doc solution is the same.

Troubleshoot third-party libraries under eclipse unable to navigate source code

Related Article

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.