Is it possible to run JavaFX applications on iOS, Android or Windows Phone 8?

后端 未结 5 664
囚心锁ツ
囚心锁ツ 2020-12-02 03:40

Can one develop an entire application using JavaFX and run it on iOS, Android or Windows Phone 8, without writing platform-specific code?

相关标签:
5条回答
  • 2020-12-02 04:14

    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.

    0 讨论(0)
  • 2020-12-02 04:16

    Possible. You can get commercial sport also.

    JavaFXPorts is the name of the open source project maintained by Gluon that develops the code necessary for Java and JavaFX to run well on mobile and embedded hardware. The goal of this project is to contribute as much back to the OpenJFX project wherever possible, and when not possible, to maintain the minimal number of changes necessary to enable the goals of JavaFXPorts. Gluon takes the JavaFXPorts source code and compiles it into binaries ready for deployment onto iOS, Android, and embedded hardware. The JavaFXPorts builds are freely available on this website for all developers.

    http://gluonhq.com/labs/javafxports/

    0 讨论(0)
  • 2020-12-02 04:17
    1. yes you can run it on iOS and Android (Win8 is not supported!
    2. no deployment as a web-app does not work
    0 讨论(0)
  • 2020-12-02 04:30

    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.

    0 讨论(0)
  • 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 ..

    0 讨论(0)
提交回复
热议问题