问题
I have an RMI application that has service implementation and it has a lot of code in it and I do not want to redo the business logic just to support an iPhone app.
Could someone assist me on a best way to access these RMI services using Objective C? Or is there any other way for making this possible, please let me know if this is a terrible question, being a software programmer, I would expect that there would be a way for heterogeneous programs to communicate with each other, so this question comes to me with that assumption.
回答1:
There's no Java runtime in iOS, nor any support for Java in the SDK, and an Objective-C app can't start up another process on the device (unless it's jailbroken), so there'd be no way for your app to run a JVM. So the only other option I know of (short of rewriting the Java code) would be to make your Java functionality available via web services.
Also, there's no direct way for applications to communicate with each other (or for that matter to even be running in the foreground simultaneously) in iOS.
来源:https://stackoverflow.com/questions/8205058/interprocess-communication-between-xcode-objective-c-and-java-rmi