Configure the Beanutils package and also the step description for importing the third package

Source: Internet
Author: User

Beanutils is a toolkit developed by Apache for Operation JavaBean.

For JavaBean, simply, there is a constructor for an empty parameter and a GetXXX method and Setxxx method for the property.

In the default API provided by the JDK, there are java.beans packages with methods such as introspector,beaninfo,propertydescriptor to manipulate JavaBean,

But the beanutils developed by Apache is more common, and beanutils needs to be used in conjunction with third-party logging tools, where we also use Apache's common logging,

Note : Here common beanutils need to cooperate with common Logging, not log4j, of course log4j is also Apache company, can download for later use.

So we need to go to Apache official website to download "Common beanutils" and log4j Toolkit:

We just download the binary bin file on the line, the suffix is tar.gz for the rar file, another suffix is the zip compressed file, download any line, anyway have to unzip:

After the decompression opened, for Commons-beanutils, we only choose "Commons-beanutils-1.9.2.jar" on it, some are doc, some are SRC,

And some tests and test-source are separated from the total beanutils.

Similarly, for commons-logging, you just have to choose "Commons-logging-1.2.jar" on the line:

======================= start configuring the split line ============================================

The next step is to import the two third-party packages into eclipse and add them to the build path:

1. First I set up a project called Beanproject in the project, create a new folder in this project, right click on "Beanproject"---> "new", select "Folder"

Name This folder name Lib:

---->

2. Next, copy the "Commons-beanutils-1.9.2.jar" and "Commons-logging-1.2.jar" (Ctrl + C), then right-click on the Lib folder that you just built, You can copy the two jar packages into the Lib folder, note that this time is just copy, of course, you can also drag the two packages directly into the Lib folder, this time a dialog box will pop up, select "Copy Files" on the line:

3. Select both packages in the Lib folder, right-click on "Build" and click "Add to Build Path", then import the two packages into the build path:

    

At this point you can see that the project manager has more of these two packages:

    

Indicates that the third-party package has been successfully imported and can be used at this time.

A final note:

As you can see from the diagram above, the imported third-party packages are displayed directly underneath the project, which is a bit annoying because "referenced Libraries" does not appear in the Project Explorer window,

Only "Package Explorer" can be displayed, if we want to display the package explorer, you should:

Window---> Show View---> Other ..., select Java---> Package Explorer so that the package explorer will display the "." Referenced Libraries ":

The imported package can be managed uniformly, and it is also convenient to look at:

    

If the referenced Libraries directory is still missing from the Package Explorer window, you can click the inverted triangle arrow in the upper-right corner of the Package Explorer window and select "Show" in the pop-up menu referenced Libraries ' Node '.

The Package Explorer window also groups items and can be grouped when there are more than 10 items, and the setup process is:

Click the inverted triangle arrow in the top right corner of the Package Explorer window and select "Top level Elements", "working sets" in the pop-up menu.

Then click "Configure working Sets" in the menu and the Group editor will pop up. Here you can create groups, create and edit groupings, and you can set items to that group, and the top-level elements in the Package Explorer window are no longer items, but groups that are created, grouped below are real projects.

   

    

Configure the Beanutils package and also the step description for importing the third package

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.