How to find the jar of java.rmi package
Asked Answered
A

1

4

I am developing an Android application which needs some rmi stuff since Android doesn't support rmi by default i found this project can 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

Thanks !!!

Adagio answered 16/3, 2011 at 6:47 Comment(0)
E
9

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.

It is conceivable that you could use jarjar or 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.

BTW, here are some more instructions on this process.

Embryologist answered 16/3, 2011 at 12:13 Comment(4)
Actually, Android permits you to put code in java.* packages; you just need to pass a special flags to dx when you do so.The 'more instructions' link covers this.Igraine
I should add that using jarjar is preferred, since that approach won't conflict if Android ever adds the package to the core platform.Igraine
@Jesse Wilson: And those "more instructions" tell you it won't work, but that you're welcome to try anyway.Embryologist
Jarjar is strongly encouraged but not strictly required. Omitting that step leads to brittle apps that may fail on OS upgrades.Igraine

© 2022 - 2024 — McMap. All rights reserved.