" It looks like you write your code in Java, then use the Javac compiler (or another Java compiler) to compile the code down to Java byte code (.class files).
You then run these class files through the XMLVM cross compiler to generate the compiled objective C code that can run on iPhones "
In the site for XMLVM ( www.xmlvm.org ) is said that :
" The goal of XMLVM is to offer a flexible and extensible cross-compiler toolchain. Instead of cross-compiling on a source code level, XMLVM cross-compiles byte code instructions from Sun Microsystem's virtual machine and Microsoft's Common Language Runtime. The benefit of this approach is that byte code instructions are easier to cross-compile and the difficult parsing of a high-level programming language is left to a regular compiler. In XMLVM, byte code-based programs are represented as XML documents. This allows manipulation and translation of XMLVM-based programs using advanced XML technologies such as XSLT, XQuery, and XPath "
Note that it does not mention JME at all, just "Java bytecode". There seem to be some Android->iPhone conversion tools and libraries, but it looks like those do not support sizable portions of the Android API.
Mark Spritzler wrote:The other thing it says it that it converts it to Microsoft's CLR code, nothing about iPhones.
I interpret the sentence to mean that it converts CLR bytecodes as well as JVM bytecodes. The next paragraph on the web site seems to bear this out. There you'll also see that the iPhone (via Objective-C) is indeed a target.
Please note that being able to cross-compile is only part of the story. Before Oracle got all snotty, I would have simply stated that both J2ME and Android were Java. Now, thanks to the lawyers I have distinguish the "Java" on Android as Dalvik.
But regardless, you can't recompile an Android Dalvik program under the J2ME Java compiler and expect it to run under J2ME. The source code may be compatible, and you may be producing acceptable J2ME bytecodes instead of Dalvik code, but the underlying OS's are so radically different that it won't even begin to function.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
No, unless iOS gets official support for a JVM. You can, however, use GWT4Titanium-Mobile (http://www.emitrom.com/gwt4timobile) and make an attempt to port the J2ME app to iOS. With GWT4Ti-Mobile you write your iOS app in Java, and ultimately it gets translated to native code. There are more details and tutorials at the URL mentioned before. The community is pretty active, so you're bound to get any help you may need to get this going.
Co-Founder, Emitrom LLC
Bringing Java APIs to the world of iOS, Flex, Touch and more.
We (Emitrom) just announced Lienzo, which allows your mobile app to work on all devices that support canvas. Web-kit's fragmentation has been a major pain point, and now with Lienzo that pain-point is gone. Lienzo bears an Apache 2 license, so it is gratis.
Lienzo is a pure GWT implementation of canvas. Pair it with our Cordova binding and you can develop canvas-based mobile apps; then turn around and deploy it using Air4j and your app is now a desktop-based app; or run it on the web, out of App Engine like our examples do.
We are in alpha right now; working hard to get more features in. With Lienzo, your imagination is the limit.