How to import a jar in Eclipse

user395734 picture user395734 · Jul 19, 2010 · Viewed 830.1k times · Source

How do I import a jar in Eclipse?

Answer

bragboy picture bragboy · Jul 19, 2010

You can add a jar in Eclipse by right-clicking on the Project → Build Path → Configure Build Path. Under Libraries tab, click Add Jars or Add External JARs and give the Jar. A quick demo here.

enter image description here

The above solution is obviously a "Quick" one. However, if you are working on a project where you need to commit files to the source control repository, I would recommend adding Jar files to a dedicated library folder within your source control repository and referencing few or all of them as mentioned above.