Basic constraints of RoboVM ahead-of-time compiler
Asked Answered
S

1

5

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?

Shivers answered 23/10, 2013 at 12:49 Comment(0)
C
8

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.

Chicalote answered 23/10, 2013 at 18:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.