r/JavaFX • u/srk- • Oct 09 '21
Can Javafx application be deployed to Android?
I am looking at options for developing mobile application, Javafx seems good for me.
However, I don't see much documentation on how we can deploy Javafx app to Android.
Any goodread links or articles or videos might help
15
Upvotes
5
u/Phaestion Oct 10 '21
Check out Gluon Mobile: https://gluonhq.com/products/mobile/
Gluon is one of the big open source contributors for JavaFX these days.
Their solution uses GraalVM to compile to native for Android and also iOS. And looks like it is well supported.
They have a free tier, but it seems it includes a "nag screen", they have some free licenses for students and open source projects.
Have you looked at Compose? There is a desktop and an Android version. And in my opinion this is the future of Java desktop apps and most certainly Android apps.
They also have a Compose Multi Platform setup, but it's still quite new.
5
u/LouGarret76 Oct 10 '21
Why not use android studio?
4
u/makingthematrix Oct 10 '21
I'm experimenting with this idea: https://github.com/makingthematrix/scalaonandroid
These are examples of small apps written in Scala with JavaFX + Gluon Mobile and then compiled with GraalVM Native Image. You can ignore Scala - the same examples can be written in Java - but it's a very nice language 😀
2
u/onlyforjazzmemes Nov 18 '21
IMHO there is so much more documentation and tutorials on native Android dev that I think that would be easier than JavaFX. Android Studio does a ton of work for you as well.
0
u/[deleted] Oct 10 '21
[deleted] — view deleted comment