Is it possible to run JavaFX applications on iOS, Android or Windows Phone 8?
Solution 1:
Yes you can run JavaFX application on iOS, android, desktop, RaspberryPI (no windows8 mobile yet).
Work in Action :
We did it! JavaFX8 multimedia project on iPad, Android, Windows and Mac!
JavaFX Everywhere
Ensemble8 Javafx8 Android Demo
My Sample JavaFX application Running on Raspberry Pi
My Sample Application Running on Android
JavaFX on iOS and Android
Dev Resources :
Android :
Building and deploying JavaFX Applications on Android
iOS :
NetBeans support for JavaFX for iOS is out!
Develop a JavaFX + iOS app with RoboVM + e(fx)clipse tools in 10 minutes
If you are going to develop serious applications here is some more info
Misc :
At present for JavaFX Oracle priority list is Desktop (Mac,windows,linux) and Embedded (Raspberry Pi, beagle Board etc) .For iOS/android oracle done most of the hardwork and opnesourced javafxports of these platforms as part of OpenJFX ,but there is no JVM from oracle for ios/android.Community is putting all together by filling missing piece(JVM) for ios/android,Community made good progress in running JavaFX on ios (RoboVM) / android(DalvikVM). If you want you can also contribute to the community by sponsoring (Become a RoboVM sponsor) or start developing apps and report issues.
Edit 06/23/2014 :
Johan Vos created a website for javafx ports JavaFX on Mobile and Tablets,check this for updated info ..
Solution 2:
Background
Invariant's answer is a good resource for how everything was started and what was the state of JavaFX on embedded and mobile in beginning of 2014. But, a lot has changed since then and the users who stumble on this thread do not get the updated information.
Most of my points are related to Invariant's answer, so I would suggest to go through it first.
Current Status of JavaFX on Mobile / Embedded
UPDATE
JavaFXPorts has been deprecated. Gluon Mobile now uses GraalVM underneath. There are multiple advantages of using GraalVM. Please check this blogpost from Gluon. The IDE plugins have been updated to use Gluon Client plugins which leverages GraalVM to AOT compile applications for Android/iOS.
Old answer with JavaFXPorts
Some bad news first:
- RoboVM is dead
- Oracle killed JavaFX on Embedded Devices
Now, some good news:
- JavaFX still runs on Android, iOS and most of the Embedded devices
- JavaFXPorts SDK for android, iOS and embedded devices can be downloaded from here
- JavaFXPorts project is still thriving and it is easier than ever to run JavaFX on mobile devices, all thanks to the IDE plugins that is built on top of these SDKs and gets you started in a few minutes without the hassle of installing any SDK
- JavaFX 3D is now supported on mobile devices
- GluonVM to replace RoboVM enabling Java 9 support for mobile developers. Yes, you heard it right.
- Mobile Project has been launched by Oracle to support JDK on all major mobile platforms. It should support JavaFX as well ;)
How to get started
If you are not the DIY kind, I would suggest to install the IDE plugin on your favourite IDE and get started.
Most of the documentation on how to get started can be found here and some of the samples can be found here.
Solution 3:
Desktop: first-class support
Oracle JavaFX from Java SE supports only OS X (macOS), GNU/Linux and Microsoft Windows. On these platforms, JavaFX applications are typically run on JVM from Java SE or OpenJDK.
Android: should work
There is also a JavaFXPorts project, which is an open-source project sponsored by a third-party. It aims to port JavaFX library to Android and iOS.
On Android, this library can be used like any other Java library; the JVM bytecode is compiled to Dalvik bytecode. It's what people mean by saying that "Android runs Java".
iOS: status not clear
On iOS, situation is a bit more complex, as neither Java SE nor OpenJDK supports Apple mobile devices. Till recently, the only sensible option was to use RoboVM ahead-of-time Java compiler for iOS. Unfortunately, on 15 April 2015, RoboVM project was shut down.
One possible alternative is Intel's Multi-OS Engine. Till recently, it was a proprietary technology, but on 11 August 2016 it was open-sourced. Although it can be possible to compile an iOS JavaFX app using JavaFXPorts' JavaFX implementation, there is no evidence for that so far. As you can see, the situation is dynamically changing, and this answer will be hopefully updated when new information is available.
Windows Phone: no support
With Windows Phone it's simple: there is no JavaFX support of any kind.