1---2name: graal3description: Build, configure, and troubleshoot GraalVM Native Image applications using native-image CLI, Maven, or Gradle Native Build Tools, including reachability metadata and issue diagnosis.4---56# Oracle Graal Skills78Use this domain to build, configure, and troubleshoot GraalVM Native Image applications with Maven, Gradle, or the CLI.910## How to Use This Domain11121. Start with the routing table below.132. Read only the specific Native Image file needed for the task.143. Prefer Native Build Tools for Maven or Gradle projects. Use the raw `native-image` workflow for simple Java files or direct CLI usage.1516## Directory Structure1718```text19graal/20|-- SKILL.md21`-- native-image/22 |-- build-native-image.md23 |-- native-build-tools.md24 |-- reachability-metadata.md25 `-- troubleshooting.md26```2728## Category Routing2930| Topic | File |31|-------|------|32| `native-image` CLI builds, options, classpath, modules, output names, binary type, optimization, URL protocols, monitoring, security | `graal/native-image/build-native-image.md` |33| Maven `native-maven-plugin`, Gradle `org.graalvm.buildtools.native`, build-tool tasks, plugin options, and native test routing | `graal/native-image/native-build-tools.md` |34| Missing reflection, JNI, resources, resource bundles, serialization, dynamic proxies, conditional metadata, and `reachability-metadata.json` layout | `graal/native-image/reachability-metadata.md` |35| Build failures, runtime failures, missing metadata symptoms, class initialization issues, memory issues, diagnostics, Maven activation issues, and where to route fixes | `graal/native-image/troubleshooting.md` |3637## Key Starting Points3839- `graal/native-image/build-native-image.md`40- `graal/native-image/native-build-tools.md`41- `graal/native-image/reachability-metadata.md`42- `graal/native-image/troubleshooting.md`4344## Common Multi-Step Flows4546| Task | Recommended Sequence |47|------|----------------------|48| Build a Java class with Native Image | `native-image/build-native-image.md` |49| Configure a Maven or Gradle project for Native Image | `native-image/native-build-tools.md` -> `native-image/build-native-image.md` for flags |50| Fix missing reflection, JNI, proxy, resource, bundle, or serialization metadata | `native-image/reachability-metadata.md` |51| Diagnose build failures or runtime behavior differences | `native-image/troubleshooting.md` -> `native-image/build-native-image.md` -> `native-image/reachability-metadata.md` if metadata is involved |5253## Sources5455- https://github.com/oracle/graal/tree/master/substratevm/skills/building-native-image56- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-maven57- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-gradle58- https://www.graalvm.org/latest/reference-manual/native-image/