com um clique
building-native-image
// Build and troubleshoot GraalVM Native Image applications. Use this skill to build Java applications with GraalVM Native Image, configure CLI options, or resolve build or runtime issues.
// Build and troubleshoot GraalVM Native Image applications. Use this skill to build Java applications with GraalVM Native Image, configure CLI options, or resolve build or runtime issues.
Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applications with Maven, configure pom.xml native image settings, run native tests, collect metadata, or resolve build or runtime issues.
Build GraalVM native images using Gradle Native Build Tools. Use this skill to build Java applications with Gradle, configure native-image build.gradle settings, or resolve build or runtime issues.
| name | building-native-image |
| description | Build and troubleshoot GraalVM Native Image applications. Use this skill to build Java applications with GraalVM Native Image, configure CLI options, or resolve build or runtime issues. |
# Building Native Image
JAVA_HOME to a GraalVM distribution if your Java program uses the Native Image SDK. If you do not know the path, ask the user to provide it.
javac.$JAVA_HOME/bin/native-image <app-name>
./app-name
-cp option.
If you encounter runtime errors related to reflection, JNI, resources, serialization, or dynamic proxies, consult references/reachability-metadata.md before attempting a fix. Use this reference for:
NoClassDefFoundError or MissingReflectionRegistrationErrorMissingJNIRegistrationErrorMissingResourceException (missing resource bundle)To configure classpath, optimization level, output name, platform target, monitoring, or other CLI flags, see references/native-image-options.md.
| Topic | File |
|---|---|
| Native Image CLI options | references/native-image-options.md |
| Missing reachability metadata | references/reachability-metadata.md |