Due to popular demand I have decided to release the source code for the BrickBreaker JavaFX sample on iOS demo I showed off last week. Initially I had intended to wait until the JavaFX font stuff had been open-sourced but some people seem very eager to try this out for themselves so here we go.

Warning! RoboVM is pre-alpha software. It’s not yet ready for production use. Apps will often be huge and run slow. This will be addressed in the future.

First of all we need to make sure you have all the prerequisites installed:

  1. Get Xcode 4.6.2 from the App Store.
  2. Download and install JDK 8 build b90. The commands below assume it ends up in /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk.
  3. Install LLVM 3.2 to /opt/llvm:
  4. Install the latest RoboVM nightly build to /opt/robovm:

You should now be able to run the BrickBreaker sample:

  1. Download the BrickBreaker sources:

  2. Compile the Java sources and copy images:

  3. Compile the class files to native code using RoboVM and launch the app on the iOS Simulator:

    After some time (the first build will take quite a lot of time) the BrickBreaker app should appear in the iOS Simulator. If you want to try this out on your iDevice (an iPad is recommended because of the screen size required by the app) just plug it into your Mac and run:

    BrickBreaker.zip also contains an Eclipse project. Here’s a link to the Eclipse update site for the nightly build of the RoboVM plug-in: http://download.robovm.org/nightlies/eclipse/