1. Add User library to eclispe:
1. Click the window menu of eclipse and select "preference"
2. In the preferences window, select Java-> build path-> User libraries, and then click New... in the dialog box that appears, enter the name of the user library.
Library name.
3. Add a jar package to the user library. Select my_lib and click Add jars... click, select the jar you want to add, and click "open". The JAR file information you just added will appear in the my_lib library.
4. Click "OK" in the window to add the user library and its jar.
You can select export to create a new user library, and you can see the content clearly.
If you are familiar with it, you can directly create a XXX. userlibraries file and put it under the project. Format:
<? XML version = "1.0" encoding = "UTF-8" standalone = "no"?>
<Eclipse-userlibraries version = "2">
<Library name = "testlib" systemlibrary = "false">
<Archive Path = "/$ {projectname}/lib/selenium-java-client-driver.jar"/>
<Archive Path = "/$ {projectname}/selenium-java-client-driver-tests.jar"/>
<Archive Path = "/$ {projectname}/testng-5.14.1.jar"/>
</Library>
</Eclipse-userlibraries>
Reprinted: http://hi.baidu.com/develop_skill/item/1cb35a483673ee93823ae14b