javaiphonejava-mej2mepolish

Can we run Java applications on iPhone?


Can we run or develop apps for iPhone in Java?

Have a look to these links and answer:

  1. http://www.iphonefaq.org/archives/9731
  2. http://www.j2mepolish.org/cms/leftsection/documentation/platforms/iphone.html
  3. http://www.ibm.com/developerworks/opensource/library/os-eclipse-iphone/

Solution

  • Currently, there is no JVM running on the iPhone. This means that the only way you have to develop apps for iPhone in Java is to have a compiler that will compile your java code down to Objective-C code.

    There are several solutions that do exactly that:

    Codename One - focuses on building applications using Java with visual tools and simulators. Open source with a SaaS backend that removes the need for a Mac.

    XMLVM - a translator to convert Java bytecode to C/Objective-C. Open source, but requires writing iOS specific code at the moment.

    There are also several proprietary solutions but I have no experience with them. E.g. Software AG has a tool called web objects.