How to add jar file to build path

I am currently working on uploading and downloading an nd file from an ftp server on Android. I now have a jar file that I need to use in my application. Please tell me how to add the jar file to the build path.

+3
source share
3 answers

Try the following:

Right click on projectpropertiesJava Build PathLibrariesAdd External Jars→ select the jar file where it is in your Pc-> click ok.

+11
source

In your .classpath file, which should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
  <classpathentry kind="src" path="src"/>
  <classpathentry kind="src" path="gen"/>
  <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />        
  <classpathentry kind="output" path="bin"/>
</classpath>

add line

<classpathentry kind="lib" path="<path to your .jar file>"/>  
+1
source

<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK" />

is in your .classpath, then you can change android.jar in the build path by simply selecting the level of the Android API you want in project-> properties-> Android (the build path is automatically updated)

+1
source

All Articles