Helloworld in Java (BINARY GraalVM)
The https://github.com/jreleaser/helloworld-java-graalvm repository shows how to configure GitHub Actions and JReleaser to:
-
compile a helloworld app with bundled Java Runtimes using GraalVM Native Image for:
-
linux-x86_64
-
osx-x86_64
-
osx-aarch_64
-
windows-x86_64
-
-
assemble distributions with JReleaser
-
create rolling early-access releases with JReleaser on every push to
main
branch
JReleaser requires 2 additional inputs that may be set as environment variables, JRELEASER_PROJECT_VERSION and JRELEASER_GITHUB_TOKEN .
More information about environment variable configuration may be found here.
|
There are two modes for packaging this application: classpath & modulepath.
classpath
-
./mvnw verify
-
./mvnw -Pjdks
-
jreleaser assemble
modulepath
-
./mvnw verify
-
./mvnw -Pjdks
-
jreleaser assemble --config-file jreleaser-modules.yml
In both cases the assembled archive is placed at out/jreleaser/assemble/helloworld/native-image
.