Java and JavaFX samples to run with GraalVM and the Gluon Client plugins for Maven.
The following platforms are currently supported:
Download the latest development version of GraalVM: https://github.com/graalvm/graalvm-ce-dev-builds/releases by choosing graalvm-ce-java11-darwin-amd64-20.2.0-dev.tar.gz
from the list of assets and unpack it to a preferred location on your system (e.g. in /opt
)
Configure the runtime environment. Set GRAALVM_HOME
environment variable to the GraalVM installation directory.
For example:
export GRAALVM_HOME=/opt/graalvm-ce-java11-20.2.0-dev/Contents/Home
Set JAVA_HOME
to point to the GraalVM installation directory
For example:
export JAVA_HOME=$GRAALVM_HOME
Download the latest development version of GraalVM: https://github.com/graalvm/graalvm-ce-dev-builds/releases by choosing graalvm-ce-java11-linux-amd64-20.2.0-dev.tar.gz
from the list of assets and unpack it to a preferred location on your system (e.g. in /opt
)
Configure the runtime environment. Set GRAALVM_HOME
environment variable to the GraalVM installation directory.
For example:
export GRAALVM_HOME=/opt/graalvm-ce-java11-20.2.0-dev
Set JAVA_HOME
to point to the GraalVM installation directory
For example:
export JAVA_HOME=$GRAALVM_HOME
Download the latest development version of GraalVM: https://github.com/graalvm/graalvm-ce-dev-builds/releases by choosing graalvm-ce-java11-windows-amd64-20.2.0-dev.zip
from the list of assets and unzip it to a preferred location on your system.
Make sure you have installed Visual Studio 2019 with the following components:
Run the maven commands mentioned below in a x64 Native Tools Command Prompt for VS 2019
. This command prompt can be accessed
from the start menu.
Configure the runtime environment. Set GRAALVM_HOME
environment variable to the GraalVM installation directory.
For example:
set GRAALVM_HOME=C:\tools\graalvm-ce-java11-20.2.0-dev
Install native-image by running:
%GRAALVM_HOME%\bin\gu install native-image
Set JAVA_HOME
to point to the GraalVM installation directory
For example:
set JAVA_HOME=%GRAALVM_HOME%
The following goals apply to Linux, Mac OS X and Windows.
To build the native image:
mvn clean client:build
To run the native image:
mvn client:run
or simply run the native executable found in target/client
.
iOS can be built only on Mac OS X
Install Homebrew
, if you haven't already. Please refer to https://brew.sh/ for more information.
Install libusbmuxd
Using brew
:
brew install --HEAD libusbmuxd
libimobiledevice
Using brew
:
brew install --HEAD libimobiledevice
ios
(for iOS devices) in the pom.xml
:<artifactId>client-maven-plugin</artifactId>
<configuration>
<target>ios</target>
<mainClass>${mainClassName}</mainClass>
</configuration>
mvn clean client:build
mvn client:run
mvn client:package
Note: Since all java bytecode is translated to native code, the compilation step can take a long time, and it requires a fair amount of memory.
Note: In order to deploy apps to an iOS device, you need a valid iOS provisioning profile, as explained in the documentation.
The client plugin will download the Android SDK and install the required packages. Alternatively, you can define a custom location to the Android SDK by setting the ANDROID_SDK
environment variable, making sure that you have installed all the packages from the following list:
android
(for android devices) in pom.xml
:<artifactId>client-maven-plugin</artifactId>
<configuration>
<target>android</target>
<mainClass>${mainClassName}</mainClass>
</configuration>
mvn clean client:build
mvn client:package
mvn client:install
mvn client:run
Note: Since all java bytecode is translated to native code, the compilation step can take a long time, and it requires a fair amount of memory.
Issues can be reported to the Issue tracker
Contributions can be submitted via Pull requests, providing you have signed the Gluon Individual Contributor License Agreement (CLA) (See What is a CLA and why do I care in case of doubt).