Source reading and Analysis: Using Eclipse to view source code such as SSH

Source: Internet
Author: User

To read the open source framework code and read the class file, we generally have two methods

1. Using MAVEN for related operations

2. Download the source package of the jar package for import reading

Here I'm using the second kind of

The steps are as follows:

A: Here if we want to read struts source code, first to the official download, here is recommended to download all package, is a package containing docs,src,lib, of course, you can also only download lib and src package, lib package for our jar package, is the usual need to import projects, The SRC package is the source package for the jar package, which contains the. Java source files for all jar packages, and docs is our documentation containing struts ' instructions for use

Download struts All-inclusive first, then unzip to see the following file

Then we open eclipse, any new Web project

We'll copy all Lib under struts into Lib under Project Web-inf.


Finally open the project under the Web App Libraries, select the jar package you want to read the right mouse button->properties, select Java Source Attachment, click External Folder, Select the physical location where the jar source package is located, OK to complete


Now you can enjoy the fun of reading the framework code.





Source reading and Analysis: Using Eclipse to view source code such as SSH

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.