JavaFX does not currently support iOS or Android, but the possibility has been subject to much hopeful speculation. One recent example is Felix Bembrick’s manifesto Six Degrees of Separation. What strikes me as odd is that people still seem to expect Oracle to deliver such ports. True, there was an announcement regarding open-sourcing “JavaFX on iOS and Android” which generated much excitement, but Richard Bair had quickly clarified the actual situation even back in February:
A few years ago at JavaOne 2011 we showed a demo of JavaFX running on Android and iOS devices. This was a proof-of-concept which has two essential elements. The first is a port of the Windowing / Graphics layer of JavaFX (Glass & Prism) to use iOS & Android APIs. This is what we are open-sourcing, nothing more nor less. We are not providing a JVM for these platforms, nor am I aware of any such plan, so it’s not in any way a complete solution. Nor do we have a plan for releasing these ports in any release. We’re just opening up JavaFX code to the Java community for further experimentation.
This means Oracle won’t do anything about iOS or Android, except contribute a preliminary port of Glass & Prism. The OpenJDK community must provide the substantial missing pieces: support to run JavaFX in the first place, plus enhancing the desktop-oriented JavaFX library with device-specific functionality. Contributors are already hard at work, but so far nothing is ready for public consumption even by average developers, let alone end users.
The absence of iOS/Android news from the recent JavaOne 2013 conference appears to confirm that Oracle’s intentions are still unchanged. So why don’t they care about such ports? Most likely because there’s no commercial benefit. As Sebastian commented:
It is hard to do really well, and it may simply not be worth the effort. The company would have to dedicate a sizable team of developers, working closely with Apple and Google (not bloody likely), and the result would be a second-rate way to develop iOS and Android apps that would forever be playing catch-up with the fast-moving targets that these platforms are, instead of doing much GUI innovation itself. And it would hold no appeal at all for committed developers wanting to build top-notch mobile apps, because they would learn and use the native APIs, because that’s what you do.
So what’s JavaFX good for, as far as Oracle is concerned? The company maintains a showcase of real-world JavaFX use cases, including ferry management and even facial surgery planning. As far as I can tell, these are all enterprise solutions that target fixed PC installations rather than arbitrary consumer devices. (Certainly, you don’t need to worry about annoyances like faulty DPI scaling if you’re only dealing with fixed screen resolutions!) Developer tools are another area where JavaFX would benefit Oracle directly – but obviously that’s no motivation for app store support, either.
That doesn’t mean Oracle won’t care about JavaFX on mobile platforms at all, but those platforms would be Windows or Linux tablets, or else custom-built devices such as the DukePad demoed at JavaOne. The DukePad is powered by Raspberry Pi which is already supported in OpenJFX, the open-source project behind JavaFX. Nice perspectives for custom embedded development, and that’s clearly where Oracle’s interests lie – not in app store deployment to a zoo of consumer devices controlled by (rather hostile) third parties.
Will we ever see JavaFX for app store deployment on iOS and/or Android? The remarkable success of relatively small companies like Unity and Xamarin indicates that the difficulties are not insurmountable. The real question is now whether there’s enough interest in the OpenJFX community to complete the ports, ensure they work on all contemporary device variations and OS revisions, and keep them working in the future. Time will tell…
2013-10-22: Richard Bair has posted an extensive status update regarding JavaFX on iOS (he doesn’t mention Android as far as I can tell). No real surprises there, but a lot of details regarding the current prototype implementation and what remains to be done.
2014-06-24: Johan Vos has set up a central website for JavaFX on Mobile and Tablets, with explanations of the status quo and instructions for using the current works-in-progress. This is still a community effort, as Oracle officially continues to ignore these platforms for JavaFX.