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.

BOOST
From plugin
graal
22k4 skills
Install
$ npx -y skills add oracle/graal --skill building-native-image --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/building-native-image

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

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
Ships withgraal

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

Get the whole plugin
Stats
21,726
Stars
1,828
Forks
Active
Maintenance
Java
Language
8h ago
Last commit
10y ago
Created
16h ago
Added

Repo: oracle/graal

Other skills on graal.