1

Possible Duplicate:
Adding a library/JAR to an Eclipse Android project

I found an interesting project to me, Wanted to use his library but I can not add to my library, as in the example

enter image description here

I do it in eclipse

I can not add. Jar in my library

enter image description here

Community
  • 1
  • 1
Max Usanin
  • 2,479
  • 6
  • 40
  • 70

4 Answers4

3

Right click your project, select Build Path -> Configure Build Path.... On the Libraries tab you can add the library.

If the JAR is contained in a project folder select Add JARs.... If you want to add it from the file system select Add External JARs.

Kai
  • 38,985
  • 14
  • 88
  • 103
  • @MaxUsanin It doesn't make a difference where it appears. Those `Android dependencies` are just a defined group of JARs. – Kai Nov 26 '12 at 12:06
  • Then ---> Could not find class 'com.nostra13.universalimageloader.core.DisplayImageOptions$Builder', referenced from method.... java.lang.NoClassDefFoundError: com.nostra13.universalimageloader.core.DisplayImageOptions$Builder – Max Usanin Nov 26 '12 at 12:10
  • yes you are right, how to fix it? – Max Usanin Nov 26 '12 at 12:12
  • The jar is not packaged while the build. Try to create a lib folder in your project copy the jar into that folder and add it to the build path from there. Check out this question: http://stackoverflow.com/questions/3642928/adding-a-library-jar-to-an-eclipse-android-project – Kai Nov 26 '12 at 12:16
  • http://stackoverflow.com/a/11003202/1568164 ... =) – Max Usanin Nov 26 '12 at 12:22
2

Right click on project Build path is displayed, take mouse over build path other option is displayed then click on configure build path

A new windows open check libraries is displayed at top navigation

Click on the libraries

Click on add External jar button enter image description here Browser your jar file

Add the file from the system.

Ankit jain
  • 4,198
  • 4
  • 19
  • 24
1

As Piotr said, I didn't understand the problem. However, here is how you can add a jar file in eclipse.

  • Right-click on your project Build path -> Configure Build Path...

  • Select Library tab There you can see on the right-hand side, Add
    JARs... or Add External JARs...

Select what do you want.

OutOfBoundsException
  • 756
  • 1
  • 11
  • 26
  • I've updated the post, right result? – Max Usanin Nov 26 '12 at 11:57
  • Seems right. Appears any errors? – OutOfBoundsException Nov 26 '12 at 12:04
  • Yes appears, Could not find class 'com.nostra13.universalimageloader.core.DisplayImageOptions$Builder', referenced from method.... java.lang.NoClassDefFoundError: com.nostra13.universalimageloader.core.DisplayImageOptions$Builder – Max Usanin Nov 26 '12 at 12:08
  • Try to select the library, click Edit, click User Libraries, select library (again) and then Add JARs...(or External JARs...) UPDATE: As I can see you are trying to add a JAR file for an Android project. I am not familiar with Android but found this solution. http://stackoverflow.com/a/3643015/1848025 Hope can help. – OutOfBoundsException Nov 26 '12 at 12:20
0

Copy the jars and paste them into your lib directory for web applications

lib location :

YourProject
    --WebContent
       ---WEB-INF
             ---lib
sunleo
  • 10,589
  • 35
  • 116
  • 196