Before trying to cross build for iOS we strongly recommend that you succeed on building OpenJFX for OS X first.
The sample application used here is a simplified version from /rt/apps/experiments/DukePad/modules/calculator (excludes OSGI references and any Java 8 syntax usage).
Besides the Calculator project, the zip file also contains a patch for OpenJFX repository
Download RoboVM from http://download.robovm.org/ and unzip it.
Install RoboVM to /opt/robovm directory
On the same directory where Calculator.zip was unzipped:
$ mkdir openjfx $ cd openjfx $ hg clone http://hg.openjdk.java.net/openjfx/8/graphics/rt $ cd rt $ patch -p1 < ../../openjfx.diff $ gradle -PCOMPILE_TARGETS=ios -PUSE_LIPO=true |
Note: At the time this wiki was written the iOS build expects the SDK version 7.0 to be available on the system.If you have different version that needs to specified. For example:
$ gradle -PCOMPILE_TARGETS=ios -PUSE_LIPO=true -PIOS_VERSION=6.1 |
On the same directory where Calculator.zip was unzipped:
$ git clone https://github.com/robovm/robovm-jfx78-compat $ cd robovm-jfx78-compat $ mvn install |
$ cd Calculator $ ant |
This compile the java code to byte code, the use RoboVM to compile the byte code to native code and finally run the application using iPad simulator.
References:
http://blog.software4java.com/?p=41
http://www.robovm.org/docs.html
https://blogs.oracle.com/jfxprg/entry/ipack_the_ios_application_packager