3

I have to evaluate Codename One, but I couldn't find infos about how the deployment works under the hood and what the end result actually is. Do they cross-compile my Java code to real native code similar to RoboVM, do they use a JVM similar to Gluon or do they have their own JVMs?

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • [*"Codename One translates all the code to native code or the native VM resulting in performance that matches or exceeds the performance of native code."*](https://www.codenameone.com/compare.html) (unfold the *"Fast*" option – MadProgrammer Nov 01 '15 at 23:32

1 Answers1

1

You can see my answer here for additional details but the gist of it is that we are somewhat different than RoboVM.

We translate the bytecode to C and compile it to native using xcode. Hence you get a fully native app and can even get the source code and compile it yourself. Since native C/Objective-C code is an officially supported path to iOS used by many apps/games this is guaranteed to work always.

RoboVM is a LLVM frontend for Java. This is rather ambitious and something that Apple just doesn't officially support. It created quite a few challenging situations for them in the past e.g. this post from a RoboVM employee explaining how hard it was for them to migrate to iOS 9... The same was true for the recent 64 bit transition etc.

For us the migration to iOS 9 and to 64 bit was relatively painless, our code base is also smaller since we limit the JDK usage to a set of supported classes for portability.

Notice that our full VM is open source under the vm tree here. We initially used XMLVM and when RoboVM launched we thought about switching to them but decided writing our own VM would reduce risk.

The VM portion is a very small piece of our solution, e.g. we can translate your app to anything including a JavaScript app thanks to TeaVM which supports threads on JavaScript. Unlike RoboVM Codename One is a true Write Once Run Anywhere solution.

Community
  • 1
  • 1
Shai Almog
  • 51,749
  • 5
  • 35
  • 65