Which Java distribution 'level' does Gluon *Mobile* JavaFX expose, for IOS and Android - i.e. Full JavaSE (desktop) or Android?

99封情书 提交于 2019-12-02 07:52:25

问题


Apologies, I'm new to both JavaFX and Gluon Mobile.

As JavaFX is/was a desktop API, I'm trying to understand exactly which level of API's Gluon Mobile exposes (compiles against) for Android and IOS? This doesn't seem to be made explicitly clear.

Once this is understood, I can better understand if I'm able to use some 3rd party API's I'm interested in, which utilise JavaSE desktop API's (specifically Javax sound), on mobile (via Gluon).


回答1:


You may want to have a look at the Gluon's knowledge base about Java 8 and JavaFX 8 features.

At the moment, Android is using the Harmony implementation of the Java SE API’s, which is somewhere between Java 6 and Java 7. This means that new Java 8 features like lambdas and streams are not supported. For both cases there are workarounds like the retrolambda and the streamsupport projects.

As for JavaFX 8 features, Media API or Printing API are not included yet.

But if you need it, you can include in your project a native solution. Have a look at the GoNative sample for a use case. Media could be added as well via NDK.




回答2:


OK, I read Oracle's Writing JavaFX Applications for Mobile Devices and:

the internal implementation of JavaFX 8 on Android and iOS does not use Java SE 8–specific APIs

The quote above relates to the usage of OpenJFX on mobile, which Gluon Mobile itself is based upon.

So there we have it, no JavaSE Desktop in Gluon Mobile/Mobile JavaFX apps.



来源:https://stackoverflow.com/questions/36538796/which-java-distribution-level-does-gluon-mobile-javafx-expose-for-ios-and-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!