Issues and alternative solutions for importing third-party source code in eclipse

Source: Internet
Author: User

In the previous section, "Configuring the Beanutils package, but also for the step-up instructions for importing the third package, I have imported the" Commons-beanutils-1.9.2.jar "package, but in the process of using beanutils for date conversion

To use the Register method in the Convertutils class, one of the parameters is to use the converter interface in the package, and the contents of the method that you see from the API documentation are the parameters that should be passed in

"Class type" and "Object value":

However, when adding an converter interface to the non-implemented method, the parameter description is changed to "Class arg0" and "Object arg1":

Therefore, the source code of the interface is not imported into the package.

An error was sent in the first way to import the source code:

The first way to import the source code: Press CTRL + Mouse click on the class name or interface name, the mouse will become a gesture, but after I click "Converter", the pop-up window becomes this:

I tried the "File"---> "Switch Workspace"---> "other" to still select the original workspace, then eclipse will restart, but this problem will still occur after I reboot

Therefore, only the most primitive method can be selected:

Right-click on "Project" or "referenced Libraries" or "third-party package to import source",---> "Build path"---> "Configure build Path"

Select "Source Attachment" under the option to import the source third-party package, click "Edit", if it is stored elsewhere, select "External location" in the popup window

Then import the source code, and finally do not forget to click on the "Apply":

After the import, we re-add the converter interface of the non-implementation method, found that the parameters are already we need, indicating that the import source is successful:

At the same time, if you press "Ctrl" when you click "Converter" to find this time you can open the statement.

As for why there is a first way of error, have not found out why ...

Issues and alternative solutions for importing third-party source code in eclipse

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.