view --main building-native-image-skill-sborka-i-otladka-prilozheniy.md
building-native-image Скилл: сборка и отладка приложений
readonly
--- lines
---
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:
```bash
$JAVA_HOME/bin/native-image <app-name>
```
3. Run the resulting executable:
```bash
./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) |
Инициализация мануала...
//
$ ls -R related_skills/
2026-04-01
⭐ 163
telnyx-webrtc-java: Скилл для WebRTC интеграции
2026-04-01
⭐ 1764
update_swiftui_uikit_for_dynamic_type: Скилл поддержки Dynamic Type
2026-04-01
⭐ 3666
flipoff-split-flap-display: Скилл для создания ретро табло
2026-04-01
⭐ 169
comet-scaffold: Скилл для создания React Native проектов
package.json
$ install --global
skills.sh
npx skills add https://github.com/oracle/graal/tree/master/docs/reference-manual/native-image/assets/skills/building-native-image
$ download --local
man
[HINT] Скачивает всю директорию скилла с GitHub: SKILL.md и все связанные файлы