问题
I was trying to connect an android application with some session beans on my server, but I realized that java.naming is not supported on android... My question is how to import javax.naming?if its not possible, so how to connect android application to my session beans?
Any ideas?
回答1:
My question is how to import javax.naming?
Most likely, you don't.
What you can try is:
Step #1: Find if Apache Harmony has javax.naming
. If so, grab it and any other Apache Harmony class that javax.naming requires that does not exist in Android.
Step #2: Refactor all of those classes into some new package (e.g., hendra.naming
). You might be able to use jarjar to assist you.
Step #3: Try using the results, which may or may not work on Android even after all that work.
来源:https://stackoverflow.com/questions/5517437/how-to-import-javax-naming