Eclipse IDE- Add jar? Add External jar? Add Library?

Chethan Thimmappa picture Chethan Thimmappa · Dec 13, 2011 · Viewed 26.8k times · Source

I want to integrate TwitterAPIME to my Blackberry project. I have 3 Jar files provided by TwitterAPIME. I am not sure how to link these 3 Jar files to my project.

My basic doubts are

What is an External Jar ? What is a Library ?

What's the difference between Adding jar, Adding External jar or Adding Library ?

Answer

Lucifer picture Lucifer · May 21, 2012

What is an External JAR?

  • External as the name suggest is a Jar file that is not built by the currently developing code. It is a utility Jar file that is added externally for extra features. It could be an API Jar file provided from the external site, just as in your case the 3 Jar files will be going to call External Jar Files.
  • To add an External Jar file in Eclipse, follow these steps: Right Click on Project -> Select Build Path -> Select Configure Build Path -> Library Tab in the following Dialog box.

What is a Library?

A Library is a in-built Jar file from the JDK Directory or any other software e.g. J2ME-Polish as you can see in the Image above. Normally these Library files are developed by a manufacturer.

What's the difference between adding JAR, Adding External JAR, and Adding Library?

  • Adding Jar File: When you have more than one project in Eclipse and you add another project's Jar file, that is called adding Jar File. There is a first Button in the Photo above, it only allows you to add Jar file from the other Project.
  • Adding External Jar: When you add any API Jar file provided by the site or another manufacturer. In your case the 3 Jar files are External Jar Files. You can add then by using second Button "Add External JARs".
  • Adding A Library: Clicking on the 4th Button will open a dialog box as below.

    You can add different libraries installed on your system. You can also add your own Library, by selecting "User Library".