- Oracle Java 11.0.1
-
sbt-1.2.7
-
The JavaFX SDK for the platform
-
Set the environment variable
JAVAFX_LIB
, for example$ export JAVAFX_LIB=~/Downloads/javafx-sdk-11.0.1/lib
-
-
Run from sbt
sbt:openjfx-sbt> run
-
Build the fat jar, and run it
$ sbt assembly $ java --module-path $JAVAFX_LIB --add-modules=javafx.controls -jar target/scala-2.12/openjfx-sbt-assembly-0.0.11.jar
-
Package the modules
$ rm -rf target/gui; jlink --output target/gui --module-path target/scala-2.12/openjfx-sbt-assembly-0.0.11.jar:$JAVAFX_LIB --add-modules=gui --launcher command=gui/gui.HelloWorld
-
Avoid "Graphics Device initialization failed for : es2, sw" when running
target/gui/bin/command
$ cp $JAVAFX_LIB/*.dylib target/gui/lib
-