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