java 如何找到java.rmi包的jar
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5321906/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to find the jar of java.rmi package
提问by Keshan
I am developing an Android application which needs some rmi stuff since Android doesn't support rmi by default i found this projectcan be used to bundle the rmi package with my Android application but i couldn't find a jar which includes java.rmi package. can anybody suggest where to find it? or any other way to use java.rmi with Android
我正在开发一个需要一些 rmi 的 Android 应用程序,因为默认情况下 Android 不支持 rmi 我发现这个项目可用于将 rmi 包与我的 Android 应用程序捆绑,但我找不到包含 java.rmi 包的 jar . 有人可以建议在哪里找到它吗?或任何其他方式在 Android 中使用 java.rmi
Thanks !!!
谢谢 !!!
回答by CommonsWare
It is unlikely that you will be able to use RMI on Android. Even if you took the code for RMI from Apache Harmony or some other source, Android does not like projects attempting to load java.*
classes other than those that ship with the OS, and so will throw a compile error.
您不太可能在 Android 上使用 RMI。即使您从 Apache Harmony 或其他一些来源获取 RMI 代码,Android 也不喜欢尝试加载java.*
除操作系统附带的类以外的类的项目,因此会引发编译错误。
It is conceivable that you could use jarjaror simple refactoring to move all the RMI code into some other package (e.g., keshan.java.rmi
), but I have no idea how well that will work.
可以想象,您可以使用jarjar或简单的重构来将所有 RMI 代码移动到某个其他包中(例如,keshan.java.rmi
),但我不知道这将如何工作。
BTW, here are some more instructionson this process.