Is there a facility in netbeans that will automate the conversion of javafx jar file into apk files?
Actually, there is a way to create an Android application (apk) from a JavaFX application, based on the JavaFXPorts project.
Recently, a new plugin has been released, so you can just 'drop it' on your JavaFX project and build the apk.
Have a look at the 'getting started' guide. Basically, considering you are using NetBeans, you will need:
It looks like this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:javafxmobile-plugin:1.0.0-rc3'
}
}
apply plugin: 'javafxmobile'
mainClassName='org.javafxports.android.MainJavaFX'
repositories {
jcenter()
}
jfxmobile {
android {
applicationPackage = 'org.javafxports.android'
}
}
I suggest you try the Ensemble 8 project, clone the project, and see for yourself how easy it is to port this application to Android.
You can create new projects with the Gradle plugin, then add a JavaFX project, add the plugin, and it will create the apk as easy as:
gradlew android
Or you can use any existing JavaFX project with this build.gradle file.
Important considerations
The plugin works with the last JDK8 8u40, but it doesn't support all Java 8 features (Streams and Optional), while it supports Lambdas. On the contrary, it supports mainly all the JavaFX 8 features.
It's in working progress, so some issues may not been solved yet.