How to Add or Import Jar in Eclipse Project

In this tutorial I will show you the simplest way to add or import jar in your eclipse project.

 

How to Add or Import Jar in Eclipse Project

1. First of all copy all the jars that you want to import.

 

2. Now paste them inside lib folder of your project.

Web Project: For web project you can find the lib folder inside YourProjectFolder > WebContent > WEB-INF > lib. If it is not present there just create lib folder.

Normal Project: For any normal project just create a lib folder in your project’s root folder i.e. YourProjectFolder > lib.

 

How to Add or Import Jar in Eclipse Project

 

3. Right click on the jars and select Build Path > Add to Build Path. This will add the jars in your project.

How to Add or Import Jar in Eclipse Project 2

 

You can also use Add External JARs method to import jars. But there is one big drawback of this method. It just links your project with the location where jar is present in your system. So when you take your project to any other system and run it then it will show missing jar error. Thats why the method I have explained above is mostly recommended.

 

Comment below if you are facing any problem in importing jars to eclipse.

Leave a Reply

Your email address will not be published. Required fields are marked *