JavaFX Services (Gradle)
This software leverages the Gluon Client plugin for Gradle for compiling the application into native code along with its required dependencies, so it can directly be executed as a native application on the target platform. Mobile hardware access is achieved through Gluon Attach. The software utilizes some of its pre-built services (Browser, Device, Push Notifications and Share)
Screenshots
Windows | MacOS X | iOS |
---|---|---|
![]() ![]() |
![]() ![]() |
![]() ![]() |
Builds
Windows | MacOS X |
---|---|
Download | Download |
Getting started
To compile the software code in your desired platform you would need to apply the following steps:
1. Setting JAVA_HOME and GRAALVM_HOME
GraalVM is mandatory for creating native apps. It is available for download on the GraalVM website. If you have a JDK already installed on your PC, it would be a wise to place GraalVM binaries under the same Java directory for consolidation. JavaFX Services app has been tested against OpenJDK version 11.0.2 and GraalVM Community Edition 21.0.
Windows Sample
JAVA_HOME=C:\Programs\Java\jdk-11.0.2
GRAALVM_HOME=C:\Programs\Java\graalvm-ce-java11-21.0.0
MacOS X Sample
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home
GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0/Contents/Home
2. Tasks
You can run the regular tasks to build and run your project as a regular Java project:
./gradlew clean build
./gradlew run
Once you are able to run the pure Java project, you proceed with the native taks:
Desktop Native Application
This task does the AOT compilation. It is a very intensive and lengthy task (several minutes, depending on your project and CPU).
Run:
./gradlew nativeCompile # AOT Compilation
./gradlew nativeLink # Generates native executable
./gradlew nativeRun # Runs the generated executable
Alternatively, you may combine all the above commands into one:
./gradlew nativeBuild nativeRun # "nativeBuild" combines nativeCompile and nativeLink.
Important Note: Opening URLs through an External Browser is not yet supported for Desktop Native Apps GraalVM Issue.
Mobile Native Application (iOS)
Make sure that you have filled in the iOS related information in build.info before compiling for iOS. You should create an Apple ID before being able to run this task. For more information read Gluon iOS Development. This task can be run only on MacOS.
Tasks for creating Mobile App are the same as Desktop Native Application.
You just need to add the -ptarget=ios parameter
Run:
./gradlew nativeCompile -Ptarget=ios
./gradlew nativeLink -Ptarget=ios
./gradlew nativeRun -Ptarget=ios
Alternatively, you may combine all the above commands into one line
./gradlew nativeBuild nativeRun -Ptarget=ios
Requirements
More information on platform requirements you may check the target platform section on Gluon website.