Oracle Graal Skills Use this domain to build, configure, and troubleshoot GraalVM Native Image applications with Maven, Gradle, or the CLI. How to Use This Domain 1. Start with the routing table below. 2. Read only the specific Native Image file needed for the task. 3. Prefer Native Build Tools for Maven or Gradle projects. Use the raw workflow for simple Java files or direct CLI usage. Directory Structure Category Routing | Topic | File | |-------|------| | CLI builds, options, classpath, modules, output names, binary type, optimization, URL protocols, monitoring, security | | | Maven , Grad…

)\n```\n\nPass arguments to the application at startup:\n\n```groovy\nruntimeArgs.add('--server.port=8080')\n```\n\n### Gradle Full Example\n\nGroovy DSL:\n\n```groovy\ngraalvmNative {\n binaries {\n main {\n imageName = 'myapp'\n mainClass = 'com.example.Main'\n verbose = true\n buildArgs.addAll(\n '--initialize-at-run-time=com.example.Lazy',\n '-H:IncludeResources=.*\\\\.properties

Oracle Graal Skills Use this domain to build, configure, and troubleshoot GraalVM Native Image applications with Maven, Gradle, or the CLI. How to Use This Domain 1. Start with the routing table below. 2. Read only the specific Native Image file needed for the task. 3. Prefer Native Build Tools for Maven or Gradle projects. Use the raw workflow for simple Java files or direct CLI usage. Directory Structure Category Routing | Topic | File | |-------|------| | CLI builds, options, classpath, modules, output names, binary type, optimization, URL protocols, monitoring, security | | | Maven , Grad…

,\n '-O3'\n )\n jvmArgs.add('-Xmx8g')\n }\n test {\n imageName = 'myapp-tests'\n }\n all {\n javaLauncher = javaToolchains.launcherFor {\n languageVersion.set(JavaLanguageVersion.of(21))\n }\n }\n }\n}\n```\n\nKotlin DSL:\n\n```kotlin\ngraalvmNative {\n binaries {\n named(\"main\") {\n imageName.set(\"myapp\")\n mainClass.set(\"com.example.Main\")\n verbose.set(true)\n buildArgs.addAll(\n \"--initialize-at-run-time=com.example.Lazy\",\n \"-H:IncludeResources=.*\\\\.properties$\",\n \"-O3\"\n )\n jvmArgs.add(\"-Xmx8g\")\n }\n named(\"test\") {\n imageName.set(\"myapp-tests\")\n }\n }\n}\n```\n\n## Missing Reachability Metadata\n\nWhen Native Image reports missing reflection, resources, serialization, proxy, or JNI entries, use [reachability-metadata.md](reachability-metadata.md).\n\nTo enable exact metadata checking and warning mode in Maven, add to plugin configuration:\n\n```xml\n\u003cconfiguration>\n \u003cbuildArgs>\n \u003cbuildArg>--exact-reachability-metadata\u003c/buildArg>\n \u003c/buildArgs>\n \u003cruntimeArgs>\n \u003cruntimeArg>-XX:MissingRegistrationReportingMode=Warn\u003c/runtimeArg>\n \u003c/runtimeArgs>\n\u003c/configuration>\n```\n\nTo enable exact metadata checking and warning mode in Gradle, add to `binaries.all`:\n\n```groovy\ngraalvmNative {\n binaries.all {\n buildArgs.add('--exact-reachability-metadata')\n runtimeArgs.add('-XX:MissingRegistrationReportingMode=Warn')\n }\n}\n```\n\nTo collect metadata with the Gradle tracing agent:\n\n```bash\n./gradlew generateMetadata -Pcoordinates=\u003clibrary-coordinates> -PagentAllowedPackages=\u003ccondition-packages>\n```\n\n## Native Testing\n\nFor Maven native tests:\n\n```bash\n./mvnw -Pnative test\n```\n\nFor Gradle native tests:\n\n```bash\n./gradlew nativeTest\n```\n\nThe Gradle native test binary is located at:\n\n```text\nbuild/native/nativeTestCompile/\u003cimageName>\n```\n\n## Sources\n\n- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-maven\n- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-gradle\n- https://graalvm.github.io/native-build-tools/latest/index.html\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":10155,"content_sha256":"fecb16bb342e96d8af314c2a7be160eb95e84ee89056fcc9fcbe9f27f8d8953a"},{"filename":"native-image/reachability-metadata.md","content":"# GraalVM Native Image Reachability Metadata\n\n## Table of Contents\n\n1. [Diagnosing the Error Type](#1-diagnosing-the-error-type)\n2. [Where to Put Metadata Files](#2-where-to-put-metadata-files)\n3. [Reflection Metadata](#3-reflection-metadata)\n4. [JNI Metadata](#4-jni-metadata)\n5. [Resource Metadata](#5-resource-metadata)\n6. [Serialization Metadata](#6-serialization-metadata)\n7. [Conditional Metadata Entries](#7-conditional-metadata-entries)\n8. [Full Sample reachability-metadata.json](#8-full-sample-reachability-metadatajson)\n\n\n## 1. Diagnosing the Error Type\n\nMatch the runtime error to the metadata section you need to fix:\n\n| Runtime Error | Root Cause | Fix In Section |\n|---|---|---|\n| `NoClassDefFoundError` | Class not included in binary | [Reflection Metadata](#3-reflection-metadata) - register the type |\n| `MissingReflectionRegistrationError` | Reflective access to unregistered class/method/field | [Reflection Metadata](#3-reflection-metadata) |\n| `NoSuchMethodException` | Method not registered for reflective invocation | [Reflection Metadata - Methods](#methods) |\n| `NoSuchFieldException` | Field not registered for reflective access | [Reflection Metadata - Fields](#fields) |\n| `MissingJNIRegistrationError` | JNI lookup of unregistered type/member | [JNI Metadata](#4-jni-metadata) |\n| `MissingForeignRegistrationError` | FFM downcall/upcall without registered descriptor | Foreign section (advanced, see GraalVM docs) |\n| `MissingResourceException` | Resource bundle not included | [Resource Metadata - Bundles](#resource-bundles) |\n\n\n**Quick diagnostic command** - run the app with warning mode to see all missing registrations without crashing:\n```shell\njava -XX:MissingRegistrationReportingMode=Warn -jar your-app.jar\n```\nUse `Exit` mode during testing to catch errors hidden inside `catch (Throwable t)` blocks:\n```shell\njava -XX:MissingRegistrationReportingMode=Exit -jar your-app.jar\n```\nEnable strict metadata mode at build time:\n```shell\nnative-image --exact-reachability-metadata ...\n# Or for specific packages only:\nnative-image --exact-reachability-metadata=com.example.mypackage ...\n```\n\n---\n\n## 2. Where to Put Metadata Files\n\nAll metadata lives in a single JSON file on the classpath:\n\n```\nsrc/main/resources/\n└── META-INF/\n └── native-image/\n └── \u003cgroupId>/\n └── \u003cartifactId>/\n └── reachability-metadata.json\n```\n\nThe file contains a top-level object with one key per metadata type:\n```json\n{\n \"reflection\": [],\n \"resources\": []\n}\n```\n\n> **Alternative approaches (when JSON isn't enough):**\n> - Pass constant arguments to `Class.forName(\"Foo\")`, `getMethod(...)`, etc. - native-image evaluates these at build time automatically.\n> - Use `-H:Preserve=\u003cpackage>` to preserve entire packages.\n\n---\n\n## 3. Reflection Metadata\n\n### Register a Type (fixes `NoClassDefFoundError`, `MissingReflectionRegistrationError`)\n\n```json\n{\n \"reflection\": [\n {\n \"type\": \"com.example.MyClass\"\n }\n ]\n}\n```\n\nThis allows `Class.forName(\"com.example.MyClass\")` and reflective lookups to find the type.\n\n### Methods\n\nFixes `NoSuchMethodError` and `MissingReflectionRegistrationError` on `Method.invoke()` or `Constructor.newInstance()`.\n\n**Register specific methods:**\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"methods\": [\n { \"name\": \"myMethod\", \"parameterTypes\": [\"java.lang.String\", \"int\"] },\n { \"name\": \"\u003cinit>\", \"parameterTypes\": [] }\n ]\n}\n```\n> Use `\"\u003cinit>\"` for constructors.\n\n**Register all methods (less precise, larger binary):**\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"allDeclaredMethods\": true,\n \"allPublicMethods\": true,\n \"allDeclaredConstructors\": true,\n \"allPublicConstructors\": true\n}\n```\n- `allDeclared*` - methods/constructors declared directly on this type\n- `allPublic*` - all public methods/constructors including those inherited from supertypes\n\n### Fields\n\nFixes `NoSuchFieldException` and `MissingReflectionRegistrationError` on `Field.get()` / `Field.set()`.\n\n**Register specific fields:**\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"fields\": [\n { \"name\": \"myField\" },\n { \"name\": \"anotherField\" }\n ]\n}\n```\n\n**Register all fields:**\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"allDeclaredFields\": true,\n \"allPublicFields\": true\n}\n```\n\n### Dynamic Proxies\n\nFor classes obtained via `Proxy.newProxyInstance(...)` - the type is the proxy's interface list:\n```json\n{\n \"type\": {\n \"proxy\": [\"com.example.IFoo\", \"com.example.IBar\"]\n }\n}\n```\n> The interface order matters - it must match the order passed to `Proxy.newProxyInstance`.\n\n### Unsafe Allocation\n\nFor `Unsafe.allocateInstance(MyClass.class)`:\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"unsafeAllocated\": true\n}\n```\n\n### Full Type Entry Reference\n\n```json\n{\n \"condition\": { \"typeReached\": \"com.example.TriggerClass\" },\n \"type\": \"com.example.MyClass\",\n \"fields\": [{ \"name\": \"fieldName\" }],\n \"methods\": [{ \"name\": \"methodName\", \"parameterTypes\": [\"java.lang.String\"] }],\n \"allDeclaredConstructors\": true,\n \"allPublicConstructors\": true,\n \"allDeclaredMethods\": true,\n \"allPublicMethods\": true,\n \"allDeclaredFields\": true,\n \"allPublicFields\": true,\n \"unsafeAllocated\": true,\n \"serializable\": true\n}\n```\n\n---\n\n## 4. JNI Metadata\n\nUsed when native C/C++ code calls back into Java via JNI. Fixes `MissingJNIRegistrationError`.\n\n> Most JNI libraries don't handle Java exceptions gracefully - always use `--exact-reachability-metadata` with `-XX:MissingRegistrationReportingMode=Warn` to see what's missing.\n\n**Register a JNI-accessible type:**\n```json\n{\n \"reflection\": [\n {\n \"type\": \"com.example.MyClass\",\n \"jniAccessible\": true\n }\n ]\n}\n```\n\n**Add fields and methods for JNI access:**\n```json\n{\n \"type\": \"com.example.MyClass\",\n \"jniAccessible\": true,\n \"fields\": [{ \"name\": \"value\" }],\n \"methods\": [\n { \"name\": \"callback\", \"parameterTypes\": [\"int\"] }\n ],\n \"allDeclaredConstructors\": true\n}\n```\n\nJNI metadata follows the same `allDeclared*` / `allPublic*` convenience flags as reflection.\n\n---\n\n## 5. Resource Metadata\n\n### Embed Resources (fixes missing `getResourceAsStream` results)\n\nResources are specified using glob patterns in the `resources` array:\n\n```json\n{\n \"resources\": [\n { \"glob\": \"config/app.properties\" },\n { \"glob\": \"templates/**\" },\n { \"glob\": \"**/Resource*.txt\" }\n ]\n}\n```\n\n**Glob rules:**\n- `*` matches any characters on one path level\n- `**` matches any characters across multiple levels\n- No trailing slash, no empty levels, no `***`\n\n**Examples:**\n```json\n{ \"glob\": \"config/app.properties\" } // exact file\n{ \"glob\": \"**/**.json\" } // all JSON files anywhere\n{ \"glob\": \"static/images/*.png\" } // all PNGs in one directory\n```\n\n> **Note:** `Class.getResourceAsStream(\"plan.txt\")` with a class literal and string literal is auto-detected by native-image - no JSON needed for those cases.\n\n### Resources from a Specific Module\n\n```json\n{\n \"resources\": [\n {\n \"module\": \"library.module\",\n \"glob\": \"resource-file.txt\"\n }\n ]\n}\n```\n\n### Resource Bundles\n\nFixes `MissingResourceException` from `ResourceBundle.getBundle(...)`.\n\n```json\n{\n \"resources\": [\n { \"bundle\": \"com.example.Messages\" },\n { \"bundle\": \"com.example.Errors\" }\n ]\n}\n```\n\nWith a specific module:\n```json\n{\n \"resources\": [\n { \"module\": \"app.module\", \"bundle\": \"com.example.Messages\" }\n ]\n}\n```\n\nBundles are included for all locales embedded in the image. To control locales:\n```shell\nnative-image -Duser.country=US -Duser.language=en -H:IncludeLocales=fr,de\n# or include everything (significantly increases image size):\nnative-image -H:+IncludeAllLocales\n```\n\n---\n\n## 6. Serialization Metadata\n\nFixes `InvalidClassException`, serialization `StreamCorruptedException`, or `ClassNotFoundException` during `ObjectInputStream.readObject()`.\n\n### In JSON\n\n```json\n{\n \"reflection\": [\n {\n \"type\": \"com.example.MySerializableClass\",\n \"serializable\": true\n }\n ]\n}\n```\n\n### Via Code (auto-detected)\n\nIf you use `ObjectInputFilter`, native-image detects this automatically when the pattern is a constant:\n```java\nvar filter = ObjectInputFilter.Config.createFilter(\"com.example.MyClass;!*;\");\nobjectInputStream.setObjectInputFilter(filter);\n```\n\n### Proxy Serialization\n\n```json\n{\n \"reflection\": [\n {\n \"type\": {\n \"proxy\": [\"com.example.IFoo\"],\n \"serializable\": true\n }\n }\n ]\n}\n```\n\n---\n\n## 7. Conditional Metadata Entries\n\nUse conditions to avoid bloating the binary with metadata for code paths that may never run.\n\n```json\n{\n \"condition\": {\n \"typeReached\": \"com.example.FeatureModule\"\n },\n \"type\": \"com.example.OptionalClass\",\n \"allDeclaredMethods\": true\n}\n```\n\nThe metadata for `OptionalClass` is only *active at runtime* once `FeatureModule` has been initialized. It is still *included at build time* if `FeatureModule` is reachable during static analysis.\n\n**A type is \"reached\" right before its static initializer runs**, or when any of its subtypes are reached.\n\n> Use conditions liberally on third-party library metadata to keep binary size reasonable.\n\n---\n\n## 8. Full Sample reachability-metadata.json\n\n```json\n{\n \"reflection\": [\n {\n \"condition\": { \"typeReached\": \"com.example.App\" },\n \"type\": \"com.example.MyClass\",\n \"fields\": [\n { \"name\": \"myField\" }\n ],\n \"methods\": [\n { \"name\": \"myMethod\", \"parameterTypes\": [\"java.lang.String\"] },\n { \"name\": \"\u003cinit>\", \"parameterTypes\": [] }\n ],\n \"allDeclaredConstructors\": true,\n \"allPublicConstructors\": true,\n \"allDeclaredFields\": true,\n \"allPublicFields\": true,\n \"allDeclaredMethods\": true,\n \"allPublicMethods\": true,\n \"unsafeAllocated\": true,\n \"serializable\": true\n },\n {\n \"type\": {\n \"proxy\": [\"com.example.IFoo\", \"com.example.IBar\"]\n }\n },\n {\n \"type\": \"com.example.JniClass\",\n \"jniAccessible\": true,\n \"fields\": [{ \"name\": \"nativeHandle\" }],\n \"allDeclaredMethods\": true\n }\n ],\n \"resources\": [\n {\n \"glob\": \"config/**\"\n },\n {\n \"module\": \"app.module\",\n \"glob\": \"static/index.html\"\n },\n {\n \"bundle\": \"com.example.Messages\"\n }\n ]\n}\n```\n\n## Sources\n\n- https://github.com/oracle/graal/blob/master/substratevm/skills/building-native-image/references/reachability-metadata.md\n- https://www.graalvm.org/latest/reference-manual/native-image/metadata/\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":10424,"content_sha256":"51c7a2d929282659075d94d4df9aba0f8a6da0cfd8203b253e50a844ed43ff38"},{"filename":"native-image/troubleshooting.md","content":"# Troubleshooting GraalVM Native Image\n\n## Overview\n\nUse this skill to route Native Image build and runtime failures to the smallest relevant fix. Use [reachability-metadata.md](reachability-metadata.md) for missing reflection, JNI, proxy, resource, bundle, or serialization metadata.\n\n## Missing Reachability Metadata\n\nIf you encounter runtime errors related to reflection, JNI, resources, serialization, or dynamic proxies, consult [reachability-metadata.md](reachability-metadata.md) before attempting a fix.\n\nUse that file for:\n\n- `NoClassDefFoundError` or `MissingReflectionRegistrationError`\n- `MissingJNIRegistrationError`\n- `MissingResourceException` from a missing resource bundle\n- Any user question about reflection, JNI, proxies, resources, resource bundles, or serialization in Native Image\n\nFor exact error reporting with GraalVM JDK 23+:\n\n```bash\nnative-image --exact-reachability-metadata \u003cclass>\n```\n\nFor scoped exact metadata handling:\n\n```bash\nnative-image --exact-reachability-metadata-path=\u003cpath> \u003cclass>\n```\n\nRun the app with warning mode to see missing registrations without crashing:\n\n```shell\njava -XX:MissingRegistrationReportingMode=Warn -jar your-app.jar\n```\n\nUse `Exit` mode during testing to catch errors hidden inside `catch (Throwable t)` blocks:\n\n```shell\njava -XX:MissingRegistrationReportingMode=Exit -jar your-app.jar\n```\n\nFor GraalVM versions prior to JDK 23, use the build-time options `-H:ThrowMissingRegistrationErrors=` and `-H:MissingRegistrationReportingMode=Warn` instead.\n\nIt is not always necessary to add all reported elements to `reachability-metadata.json`. The element causing the program failure is usually among the last listed.\n\n## Classpath and Modules\n\nIf `native-image` cannot find your classes:\n\n```bash\nnative-image -cp \u003cpath1>:\u003cpath2> \u003cclass>\n```\n\nIf using modules:\n\n```bash\nnative-image -p \u003cmodule-path> --add-modules \u003cmodule-name> \u003cclass>\n```\n\n## Class Initialization and Linking\n\nIf a class fails because it initializes at build time but must not:\n\n```bash\nnative-image --initialize-at-run-time=com.example.LazyClass \u003cclass>\n```\n\nIf a class must be initialized at build time:\n\n```bash\nnative-image --initialize-at-build-time=com.example.EagerClass \u003cclass>\n```\n\nIf a type must be fully defined at build time:\n\n```bash\nnative-image --link-at-build-time \u003cclass>\n```\n\n## Builder JVM and Memory\n\nIf the build runs out of memory:\n\n```bash\nnative-image -J-Xmx8g \u003cclass>\n```\n\nIf you need to set a system property at build time:\n\n```bash\nnative-image -Dkey=value \u003cclass>\n```\n\nIf you need to pass a flag to the JVM running the builder:\n\n```bash\nnative-image -J\u003cflag> \u003cclass>\n```\n\n## Diagnostics\n\nIf you want debug symbols in the binary:\n\n```bash\nnative-image -g \u003cclass>\n```\n\nIf you want verbose build output:\n\n```bash\nnative-image --verbose \u003cclass>\n```\n\nIf you want to inspect class initialization and substitutions:\n\n```bash\nnative-image --diagnostics-mode \u003cclass>\n```\n\nIf you want a detailed HTML build report:\n\n```bash\nnative-image --emit build-report \u003cclass>\n# or: --emit build-report=report.html\n```\n\nIf you want to trace instantiation of a specific class:\n\n```bash\nnative-image --trace-object-instantiation=com.example.MyClass \u003cclass>\n```\n\nIf you want to see the native toolchain and build settings:\n\n```bash\nnative-image --native-image-info\n```\n\n## Maven Native Build Tools\n\n- `\"Could not resolve artifact\"` - Ensure `mavenCentral()` is in repositories and the version is correct.\n- `\"Could not find goal 'compile-no-fork'\"` - Verify `\u003cextensions>true\u003c/extensions>` is set on the plugin.\n- Build runs without native compilation - Check you are activating the profile: `./mvnw -Pnative package`.\n- `\"No tests found\" in native test` - Ensure you declare `maven-surefire-plugin` 3.0+ in your build. If you use Maven Surefire prior to 3.0 M4 or your build forces an older JUnit Platform version, add `junit-platform-launcher` to test dependencies.\n\nIf Maven native tests fail due to missing reflection or resource metadata, collect metadata using the tracing agent:\n\n```bash\n./mvnw -Pnative -Dagent=true test\n./mvnw -Pnative native:metadata-copy\n./mvnw -Pnative test\n```\n\n## Gradle Native Build Tools\n\nIf the build fails with class initialization, linking errors, memory issues, or the binary behaves incorrectly at runtime, configure the relevant `buildArgs`, `jvmArgs`, or diagnostics in the `graalvmNative` block. See [native-build-tools.md](native-build-tools.md).\n\nIf Gradle native tests fail and you need the native test binary, the source location is:\n\n```text\nbuild/native/nativeTestCompile/\u003cimageName>\n```\n\n## Additional Run-Time Checks\n\nSometimes upgrading to the latest GraalVM version can resolve a run-time issue.\n\nIf the application code uses the `java.home` property, set it explicitly when running the native executable. Otherwise, `System.getProperty(\"java.home\")` returns `null`.\n\n```bash\n./myapp -Djava.home=\u003cpath>\n```\n\nFor URL protocol support, see [build-native-image.md](build-native-image.md). If the failure involves charset-sensitive behavior, add charset support at build time. This can increase binary size.\n\n```bash\nnative-image -H:+AddAllCharsets \u003cclass>\n```\n\nFor locale-sensitive resource bundle behavior, see [reachability-metadata.md](reachability-metadata.md). If the application uses security providers, pre-initialize them at build time:\n\n```bash\nnative-image -H:AdditionalSecurityProviders=\u003clist-of-providers> \u003cclass>\n```\n\nFor diagnosing native shared libraries, use missing-registration exit mode:\n\n```bash\nnative-image -R:MissingRegistrationReportingMode=Exit \u003cclass>\n```\n\n## Sources\n\n- https://github.com/oracle/graal/tree/master/substratevm/skills/building-native-image\n- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-maven\n- https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-gradle\n- https://www.graalvm.org/jdk25/reference-manual/native-image/guides/troubleshoot-run-time-errors/\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":5945,"content_sha256":"54d8db82769fb56b5aeb925c4c0aa162836dea5004368c6b3e3afdf51a1c3cb6"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Oracle Graal Skills","type":"text"}]},{"type":"paragraph","content":[{"text":"Use this domain to build, configure, and troubleshoot GraalVM Native Image applications with Maven, Gradle, or the CLI.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"How to Use This Domain","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Start with the routing table below.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read only the specific Native Image file needed for the task.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Prefer Native Build Tools for Maven or Gradle projects. Use the raw ","type":"text"},{"text":"native-image","type":"text","marks":[{"type":"code_inline"}]},{"text":" workflow for simple Java files or direct CLI usage.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Directory Structure","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"text"},"content":[{"text":"graal/\n|-- SKILL.md\n`-- native-image/\n |-- build-native-image.md\n |-- native-build-tools.md\n |-- reachability-metadata.md\n `-- troubleshooting.md","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Category Routing","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Topic","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"File","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"native-image","type":"text","marks":[{"type":"code_inline"}]},{"text":" CLI builds, options, classpath, modules, output names, binary type, optimization, URL protocols, monitoring, security","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"graal/native-image/build-native-image.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Maven ","type":"text"},{"text":"native-maven-plugin","type":"text","marks":[{"type":"code_inline"}]},{"text":", Gradle ","type":"text"},{"text":"org.graalvm.buildtools.native","type":"text","marks":[{"type":"code_inline"}]},{"text":", build-tool tasks, plugin options, and native test routing","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"graal/native-image/native-build-tools.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Missing reflection, JNI, resources, resource bundles, serialization, dynamic proxies, conditional metadata, and ","type":"text"},{"text":"reachability-metadata.json","type":"text","marks":[{"type":"code_inline"}]},{"text":" layout","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"graal/native-image/reachability-metadata.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Build failures, runtime failures, missing metadata symptoms, class initialization issues, memory issues, diagnostics, Maven activation issues, and where to route fixes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"graal/native-image/troubleshooting.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Key Starting Points","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"graal/native-image/build-native-image.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"graal/native-image/native-build-tools.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"graal/native-image/reachability-metadata.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"graal/native-image/troubleshooting.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Common Multi-Step Flows","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Task","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Recommended Sequence","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Build a Java class with Native Image","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"native-image/build-native-image.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Configure a Maven or Gradle project for Native Image","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"native-image/native-build-tools.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" -> ","type":"text"},{"text":"native-image/build-native-image.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" for flags","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Fix missing reflection, JNI, proxy, resource, bundle, or serialization metadata","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"native-image/reachability-metadata.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Diagnose build failures or runtime behavior differences","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"native-image/troubleshooting.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" -> ","type":"text"},{"text":"native-image/build-native-image.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" -> ","type":"text"},{"text":"native-image/reachability-metadata.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" if metadata is involved","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Sources","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"https://github.com/oracle/graal/tree/master/substratevm/skills/building-native-image","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-maven","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"https://github.com/oracle/graal/tree/master/substratevm/skills/build-native-image-gradle","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"https://www.graalvm.org/latest/reference-manual/native-image/","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"graal","author":"@skillopedia","source":{"stars":638,"repo_name":"skills","origin_url":"https://github.com/oracle/skills/blob/HEAD/graal/SKILL.md","repo_owner":"oracle","body_sha256":"b46ee65299229d32b4b1d41ff7f7ca9b5f3e61e8f0a3121b35d181a61f52e8cf","cluster_key":"b02ff11b05066de2064c5fdae9723010fcfdb58a5fe0c9c67f96881578f69dba","clean_bundle":{"format":"clean-skill-bundle-v1","source":"oracle/skills/graal/SKILL.md","attachments":[{"id":"af98bcc8-6fdd-5550-b268-3bf5a6dcc635","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/af98bcc8-6fdd-5550-b268-3bf5a6dcc635/attachment.md","path":"native-image/build-native-image.md","size":4332,"sha256":"014aeeb2ec700adf0125db7a3525c2307a3ff5ae14a6ede543c88f0f6748a8c2","contentType":"text/markdown; charset=utf-8"},{"id":"41306b36-d8ec-5a4d-ba01-8795a4025ac0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/41306b36-d8ec-5a4d-ba01-8795a4025ac0/attachment.md","path":"native-image/native-build-tools.md","size":10155,"sha256":"fecb16bb342e96d8af314c2a7be160eb95e84ee89056fcc9fcbe9f27f8d8953a","contentType":"text/markdown; charset=utf-8"},{"id":"8ba76a5b-560d-5db5-a8b3-f45da745af6c","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/8ba76a5b-560d-5db5-a8b3-f45da745af6c/attachment.md","path":"native-image/reachability-metadata.md","size":10424,"sha256":"51c7a2d929282659075d94d4df9aba0f8a6da0cfd8203b253e50a844ed43ff38","contentType":"text/markdown; charset=utf-8"},{"id":"7f234c14-6495-5d24-82ec-0b2fbed748c0","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7f234c14-6495-5d24-82ec-0b2fbed748c0/attachment.md","path":"native-image/troubleshooting.md","size":5945,"sha256":"54d8db82769fb56b5aeb925c4c0aa162836dea5004368c6b3e3afdf51a1c3cb6","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"2fa7672367b3838e7aa6112d7109376046cbe1ee527fe2d511387a9f48f19fd3","attachment_count":4,"text_attachments":4,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":2,"skill_md_path":"graal/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"web-development","category_label":"Web"},"exact_dupes_collapsed_into_this":1},"version":"v1","category":"web-development","import_tag":"clean-skills-v1","description":"Build, configure, and troubleshoot GraalVM Native Image applications. Use this skill for native-image CLI builds, Maven or Gradle Native Build Tools, reachability metadata, and build or run time issue diagnosis."}},"renderedAt":1782980369923}

Oracle Graal Skills Use this domain to build, configure, and troubleshoot GraalVM Native Image applications with Maven, Gradle, or the CLI. How to Use This Domain 1. Start with the routing table below. 2. Read only the specific Native Image file needed for the task. 3. Prefer Native Build Tools for Maven or Gradle projects. Use the raw workflow for simple Java files or direct CLI usage. Directory Structure Category Routing | Topic | File | |-------|------| | CLI builds, options, classpath, modules, output names, binary type, optimization, URL protocols, monitoring, security | | | Maven , Grad…