I try to do it the following way:
Right click on the name of the project.
Click on Build Path in the drop dawn menu.
Click on "Configure Build Path"
And then I do not know what to do. Should I select "Source", "Projects", "Libraries", "Order and Export"?
In "Libraries" I have "Add JARs..." and "Add External JARs...". What should I select? (I have already a .jar file in the lib folder of my project.)
ADDED:
If I click on "Add JARs" in the "Libraries" tab, I see the "lib" sub-folder but if I go there I do not see my .jar file there (and I know that it is there).
Build Path
> Add to Build Path
You're done.
If you want to add the Library with the Java Build Path
view, as you tried you have to use Add JARs
. If you copied the library via File System the Project is not in sync. You could press F5
on the selected Project.
If you edit outside of Eclipse a lot, you can enable auto-refresh by going to Window > Preferences
menu, then in the Preferences dialog box, select General > Workspace
.
Check the Refresh automatically
box.