2

So GluonVM states that it supports Java 9 modules, and the Java 9 JavaFX API (http://docs.gluonhq.com/gluonvm/), but the sample project specifies source compatibility 1.8.

I'm confused how to setup my project in Eclipse; with source compatibilty at 8 the Gradle plugin of Eclipse will automatically select a Java 8 compatible JDK. Should I configure JDK 9.0.4 as the Java8-SDK? And then use the JavaFX 9 API (future proof code)? And do I need to specify a module-info.java? I would like to do that.

tbeernot
  • 2,473
  • 4
  • 24
  • 31

1 Answers1

3

As you know, Gluon's jfxmobile plugin has two flavors for now: 1.3.15+ and 2.0.30+.

The 1.3.15+ version works on Desktop, Android and iOS with JDK 8.

The 2.0.30+ version uses Gluon VM and it works:

  • On Desktop under JDK 8, 9 or 10.
  • On Android under JDK 8, 9 or 10, but everything has to be back ported to 8. So you need Java 8 compatibility in all your dependencies. This explains why module-info is not supported.
  • On iOS under JDK 9 or 10. You could remove the 8 compatibility if you deploy only to iOS.

As you can see, the bottleneck here is Android, as it doesn't allow Java 9+ yet.

However, there is work in progress to get JavaFX 11+ running on Android as well, so that will bring all the platforms to the same level:

  • Desktop runs JavaFX 11+
  • Embedded runs JavaFX 11+ (see this)
  • Gluon VM on iOS will support JavaFX 11+
  • Android will support JavaFX 11+.
José Pereda
  • 44,311
  • 7
  • 104
  • 132