Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic constraints of RoboVM ahead-of-time compiler

Tags:

ios

robovm

With great interest i have been following RoboVM for iOS development. Can somebody point out to me the constraints of your JavaFX (or whatever technology you use) when running on iOS?

For instance, can you use Spring? I guess this will never be possible since RoboVM uses a ahead-of-time compiler and Spring is runtime dependency injection. Can somebody elaborate?

How about JPA and other Java EE technologies?

like image 582
HighTML Avatar asked Oct 23 '13 12:10

HighTML


1 Answers

RoboVM supports most things you expect from a JVM including reflection which is what Spring uses for its dependency injection. Something like RoboGuice should work fine on RoboVM.

The most notable feature not supported by RoboVM is runtime bytecode generation and loading. Libraries that rely on bytecode manipulation will not be usable on RoboVM.

Another thing missing from RoboVM is support for dynamic JNI. JNI is still supported but the native code has to be linked in statically at compile time as opposed to dynamically at runtime as an ordinary JVM would do. The reason is that ordinary JNI is based on dynamic libraries but dynamic libraries are not allowed on iOS.

RoboVM's runtime class library (java.*, javax.*, etc) is based on the non-UI parts of Android's runtime class library. So any technology that works on Android and doesn't use the Android UI classes should in theory work on RoboVM.

like image 71
ntherning Avatar answered Nov 11 '22 01:11

ntherning