Skip to content

Commit a66619d

Browse files
tisonkunremkop
authored andcommitted
docs: add GraalVM Native Image demo
Signed-off-by: tison <[email protected]>
1 parent 50a3a6d commit a66619d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/index.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13151,10 +13151,7 @@ path/to/native-image -cp picocli-4.7.2-SNAPSHOT.jar --static -jar myapp.jar
1315113151

1315213152
CAUTION: To create a native image, the compiler toolchain for your platform needs to be installed. See https://www.infoq.com/articles/java-native-cli-graalvm-picocli/[Build Great Native CLI Apps in Java with Graalvm and Picocli] for details.
1315313153

13154-
GraalVM includes a https://graalvm.github.io/native-build-tools/latest/maven-plugin.html[Maven plugin]
13155-
to generate a native image during the build.
13156-
Gradle users may be interested in the https://github.com/palantir/gradle-graal[gradle-graal] plugin by Palantir, or the https://plugins.gradle.org/plugin/org.mikeneck.graalvm-native-image[graalvm-native-image] plugin by Mike Neck.
13157-
(Documentation for both Maven and Gradle plugins seems sparse at time of this writing.)
13154+
GraalVM includes a https://graalvm.github.io/native-build-tools/latest/maven-plugin.html[Maven plugin] and a https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html[Gradle plugin] to generate a native image during the build. Gradle users may be interested in the https://github.com/palantir/gradle-graal[gradle-graal] plugin by Palantir also.
1315813155

1315913156
==== Where can I get More Details?
1316013157

@@ -13165,6 +13162,8 @@ This https://picocli.info/picocli-on-graalvm.html[older article], "Picocli on Gr
1316513162

1316613163
See also this https://github.com/remkop/picocli-native-image-demo[demo Gradle project] and this https://github.com/remkop/picocli-native-image-maven-demo[demo Maven project] that provide a simple complete CLI app, with build instructions, that developers can clone, and build to get the stand-alone executable.
1316713164

13165+
See also the http://github.com/korandoru/hawkeye[korandoru/hawkeye] for a real-world Maven project that provide a native image and a slim Docker image powered by native image.
13166+
1316813167
[TIP]
1316913168
====
1317013169
Native images on Windows have the https://github.com/oracle/graal/issues/1762[problem] that the native image does not include the required dependency `msvcr100.dll` (for Java 8) or `VCRUNTIME140.dll` (with GraalVM 19.3 or later for Java 11). On Windows machines where this dependency is not in the `PATH`, the native image fails to start, and shows an error dialog "System Error: The program can't start because VCRUNTIME140.dll is missing from your computer".

0 commit comments

Comments
 (0)