views:

126

answers:

4

I'm wondering if there is a standard method for deploying applications originally written in Java, to iOS4 devices.

I assume that the application in original format cannot be deployed - is there perhaps an emulation layer that I can use, or a stable compiler that compiles Java to ObjectiveC?

+1  A: 

Option 1:

Use one of several cross compilers, compiling Java to ObjectiveC:

http://www.xmlvm.org/overview/

http://www.flexycore.com/ispectrum-overview.html

Option 2:

Package custom JVM with java application, with restrictions that meet the latest agreement (including no byte-code download capability and no JIT compilation). No JVM specifically designed for the iPhone is currently (Oct 2010) available, though the IKVM might run on top of Monotouch, and Oracle may build a version of the Java SE for the iPhone eventually.

Option 3:

Cross compile Java to one of the existing interpreters that are already accepted on the iPhone (eg, cross compile Java to C# and run the app on monotouch)

blueberryfields
+1  A: 

With the new current iOS SDK agreement and App store rules, it may be possible for you to embed a Java applet with your own JVM interpreter and runtime engine (but no byte-code download capability and no JIT compilation allowed).

hotpaw2
Are you sure - is there an explanation of the agreement somewhere that shows this is legal (or maybe you can link to the portions of the agreement that are relevant?)
blueberryfields
Section 3.3.2 of the Standard Agreement (September dated) may be of interest.
hotpaw2
As evidence of the agreement change on programming language VMs, note that there are now at least 2 obvious BASIC interpreters approved and available in the App store, but only subsequent to the 3.3.2 rule changes.
hotpaw2
A: 

Another seldom mentioned possibility for deploying any non media or graphic intensive networked app, such as many typical Java applets, is to run a customized RDP or VNC viewer on the iPhone and and view a Java app that is being hosted and run remotely.

hotpaw2
This doesn't sound like something I can easily deploy on the app store, though.
blueberryfields
@blueberryfields : There are already customized remote app viewers in the App store. One for viewing Firefox running in a cloud VM, for instance.
hotpaw2
A: 

Mechanically translating some of your code will likely work pending finding a cross compiler / translator. Trying to run a Java based GUI on iPhone is just plain stupid in my opinion. So the smart thing would be to port the GUI by hand.

The problem of course is if the app is mostly GUI you might as well write the whole thing over. Likewise if the app uses APIs that there is not a simple translation for you again might as well rewrite the entire app.

In a nut shell I think Steve J. Was right here, the route you are comtemplating just leads to poor user experiences. It actually makes me wonder why you would even think that a Java based app would be successful on iPhone.

David Frantz