Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a library in Eclipse?

I downloaded the Gson library from http://code.google.com/p/google-gson/. The archive contains the following jar files:

google-gson-1.3/gson-1.3-javadoc.jar
google-gson-1.3/gson-1.3.jar
google-gson-1.3/gson-1.3-sources.jar

How do I set my Eclipse to be able to use the package in my projects? Where do I put the documentation?

like image 587
jul Avatar asked May 03 '10 15:05

jul


2 Answers

Right Click on the project, Build Path->Add External Archives

like image 66
bakkal Avatar answered Sep 29 '22 08:09

bakkal


Here is the youtube link which answers this question. it shows how to step by step add gson to Java. https://www.youtube.com/watch?v=fzdIcbnnwSA

1)Add google-gson-1.3/gson-1.3.jar as external library

2) click on the new added library and add google-gson-1.3/gson-1.3-sources.jar to source attachment

3) click on the new added library and add javadoc google-gson-1.3/gson-1.3-javadoc.jar to javadoc location.

like image 20
Soghra Gargari Avatar answered Sep 29 '22 06:09

Soghra Gargari