I saw article about Including additional javax.* packages in your Android App http://code.google.com/p/dalvik/wiki/JavaxPackages . . . and i want to do the same thing but using eclipse so could anyone tell how to do it ??
A:
Adding an External Library (.jar) using Eclipse
You can use a third party JAR in your application by adding it to your Eclipse project as follows:
In the Package Explorer panel, right-click on your project and select Properties.
Select Java Build Path, then the tab Libraries.
Press the Add External JARs... button and select the JAR file.
Alternatively, if you want to include third party JARs with your package, create a new directory for them within your project and select Add Library... instead. It is not necessary to put external JARs in the assets folder.
JackN
2010-10-11 01:15:27
thank you for your answer but i know what you say but it is not what i want i want to add jars like javax but the delvak give an error as javax is not included in it the link i posted show how to add javax to the project and set the system properities but not with eclipse with ant
mohamed sakr
2010-10-11 07:07:13
Those instruction are exactly what I used to add several .jar files to my eclipse project. The link I posted is http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary
JackN
2010-10-11 11:28:39
the link you post is for adding jars to eclipse projects (normal jars) but if you try to add javax.* jar it will give you error as the android vm (delvak) don't have javax package included in ..the link i post enable you to add javax pachage in your application with no error the problem is that it tell you how to do that with ant and i want to do that with eclipse
mohamed sakr
2010-10-11 15:35:08
Again, those instruction are exactly what I used to add several .jar files to my eclipse project, including javax. I don't use ant (directly), only eclipse.
JackN
2010-10-11 23:04:25
Did you download the javax jar files you need to a local folder? You may need to be specific about which javax jar files you are using rather than javax.*. What is text of your error message?
JackN
2010-10-12 09:57:09
thank you for your reply ...... stax-api-1.0.1.jar is the jar i mean it include javax.xml.namespace,javax.xml.stream the error is "Conversion to Dalvik format failed with error 1"
mohamed sakr
2010-10-12 21:27:46
Now use http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibrary to add stax-api-1.0.1.jar to your eclipse project after copying stax-api-1.0.1.jar to a folder in your project.
JackN
2010-10-12 23:05:27
when i try to test the example in http://code.google.com/p/dalvik/wiki/JavaxPackages ... in eclipse with the link you send me it give me an error but not compile error as befor as i include the jars as library
mohamed sakr
2010-10-14 13:43:14