How to import javax.naming?

喜欢而已 提交于 2020-02-04 08:13:31

问题


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

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