Choose one of the following build options:
-
Package: This is the default build option. It creates a JAR file that can be run on any JVM.
-
Native Image: This option builds a native executable using GraalVM Native Image. It results in faster startup times and lower memory usage but may have limitations on certain Java features.
To use Native Image, ensure you have GraalVM installed and configured. Then, uncomment and set the graalVMNativeImageCommand
in your build.sbt
file:
graalVMNativeImageCommand := "/path/to/graalvm/bin/native-image"
Note: If you're not using Native Image, you can leave this line commented out or remove it entirely.