How to add the jar file into the build path

家住魔仙堡 提交于 2019-12-29 08:01:22

问题


currently i am working on the nd file upload and download from ftp server to android. now i am having the jar file which i need to use in my application.can to please suggest me how to add jar file into the build path.


回答1:


Try this:

Right click on project-> properties-> Java Build Path-> Libraries-> Add External Jars-> select the jar file where it is in your Pc-> click ok.




回答2:


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 a line

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



回答3:


As long as the entry

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

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



来源:https://stackoverflow.com/questions/6327434/how-to-add-the-jar-file-into-the-build-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!