Skip to content
Development
Skill

/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.

From plugin
graal
22k4 skills

Claude Code

$ npx -y skills add oracle/graal --skill building-native-image --agent claude-code

SKILL.md

building-native-image.SKILL.md
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

Prerequisites

  • Set `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.

​

Build and Run

1. Compile your Java file with `javac`. 2. Build the Native Image:

	$JAVA_HOME/bin/native-image <app-name>

3. Run the resulting executable:

	./app-name

4. If Native Image cannot find your class file, set the classpath explicitly with the `-cp` option. ​

Troubleshooting

Reachability Metadata

If you encounter runtime errors related to reflection, JNI, resources, serialization, or dynamic proxies, consult [`references/reachability-metadata.md`](references/reachability-metadata.md) before attempting a fix. Use this reference for:

  • `NoClassDefFoundError` or `MissingReflectionRegistrationError`
  • `MissingJNIRegistrationError`
  • `MissingResourceException` (missing resource bundle)
  • Any user question about reflection, JNI, proxies, resources, resource bundles, or serialization in Native Image.

​

Native Image Options

To configure classpath, optimization level, output name, platform target, monitoring, or other CLI flags, see [`references/native-image-options.md`](references/native-image-options.md).

Reference Files

| Topic | File | |-------|------| | Native Image CLI options | [references/native-image-options.md](references/native-image-options.md) | | Missing reachability metadata | [references/reachability-metadata.md](references/reachability-metadata.md) |

Read more
@oracle
Ships withgraal

GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀

Stars on GitHub

Momentum

stars in total
21.8k
Star history of oracle/graal on GitHub, a chart by star-history.com

Other skills on graal.

build-native-image-gradle

build-native-image-gra…

Build GraalVM native images using Gradle Native Build Tools. Use this skill to build Java applications with Gradle, configure…

@oracle@oracleInstall Skill
build-native-image-maven

build-native-image-mav…

Build GraalVM native images using the native-maven-plugin (org.graalvm.buildtools). Use this skill to build Java applications…

@oracle@oracleInstall Skill
update-libcontainer

update-libcontainer

Reimport Native Image's vendored libcontainer from a newer JDK while preserving local adaptations in a reviewable commit stack.…

@oracle@oracleInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc3w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react10d252k
@facebook@facebookInstall Skill

Questions about building-native-image.

Which coding agents can use building-native-image?
building-native-image installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.