views:

4310

answers:

3

I have created an Android project and added an external JAR (hessian-4.0.1.jar) to my project. I then add the JAR to the buildpath and check it of in Order and Export.

Order and Export is ignored it seams, and all classes from the external JAR is missing in runtime.

Is there a trick to properly include the needed classes from an external JAR when building an Android application using the Eclipse Plug-In. I do not want to use ant of Maven.

+9  A: 

Yes, you can use it. Here is how:

  1. Your Project -> right click -> Import -> Archive File -> yourjar.jar
  2. Your Project -> right click -> Properties -> Java Build Path -> Libraries -> Add Jar -> yourjar.jar

This video might be useful in case you are having some issues.

MannyNS
+2  A: 

Turns out I have not looked good enough at my stack trace, the problem is not that the external JAR is not included.

The problem is that Android platform is missing javax.naming.* and many other packages that the external JAR has dependencies too.

Adding external JAR files, and setting Order and Export in Eclipse works as expected with Android projects.

A: 

i have the same problem could you tell me if you solve it...

mohamed sakr