Importing external jar packages in eclipse
Method/Step
1
First create a folder under the project and save our Jar package.
Right-click on the project name and click "New"--"floder" to open the new folder window
Steps to read
2
Enter the folder name "Lib" and click "OK". We typically store external jar packages in the Lib folder
Steps to read
3
Find the jar package that we want to introduce, the mouse to select the jar package, and then hold down the left mouse button, drag the jar package into the Lib folder. Or, copy the jar package first, then right-click on the Lib folder and select Copy. At this point, open the selection box, we select the default "Copy Files", click "OK" to close. Then we can see the jar package that we copied successfully under the Lib folder.
Steps to read
Steps to read
4
At this point, only the jar package is copied to the project and cannot be used. We then right-click on the project name and select
"Build Path"--"Configure build Path ...".
Steps to read
5
In the window that opens, select the Libraries page, and then click From the button on the right
"Add JARs ..."
Steps to read
6
In the window that opens, we expand the project and Lib folder for this item, then select the jar package that we just copied to the project, then click "OK" to close the window
Steps to read
7
At this point, we can see the name of the jar package we introduced in the "Libraries" page that we just opened. Click "OK" to confirm.
Steps to read
8
At this point, in eclipse, we can use the jar package.
Steps to read
END
Baidu Experience: jingyan.baidu.com
Precautions
Importing external jar packages in eclipse