Open Eclipse, build project: Test, import the STRUTS2 related jar package into it. Operate under the Package Explorer tab bar.
Such as:
Here, for example, refer to the source code under Struts2-core-2.3.12.jar in Struts2.
Under the test project, find the Web App Libraries-Struts2-core-2.3.12.jar, right-click Struts2-core-2.3.12.jar, select "Properties"
Such as:
In the New Popup dialog box, select Java Source Attachment-External location-External floder ...
Such as:
At this point, a new dialog box pops up. Locate the source code of the Struts2-core-2.3.12.jar mentioned in step 1 in the hard disk, then click OK, go back to the dialog box and confirm that the information is correct, click "OK"
At this point, the source code succeeds in establishing a connection with eclipse.
Next, there are a number of ways to look up a class of source code in eclipse, where the small part only introduces a relatively quick approach.
Press and hold the keyboard "Ctrl", with the mouse touch to one of the classes you call, left-click, the source code is out.
END
This experience applies to beginners.
If you do not have Eclipse and source code connected, you can only review the contents of the post-compilation
- IDEA_WJ Reprint Please specify the author's pen name
Ways to view source code using Eclipse