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