building-native-image
यह क्या करती है
यह स्किल AI को GraalVM Native Image से Java ऐप बनाने, build विकल्प सेट करने और समस्याएँ ठीक करने के चरण सिखाती है। यह उन डेवलपरों के लिए है जो चाहते हैं कि Java प्रोग्राम एक ही native executable के रूप में चले।
कब इस्तेमाल करें
- ✓जब आपको Java प्रोग्राम को GraalVM से native executable में बदलना हो।
- ✓जब Native Image build या बना ऐप reflection, JNI, resource या proxy त्रुटियों से फ़ेल हो।
- ✓जब आप classpath, output नाम या optimization level जैसे Native Image build विकल्प बदलना चाहते हों।
Skill का लिंक
https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/skills/building-native-image/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे Java ऐप को GraalVM Native Image से native executable में बनाने में मदद कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI Java कोड compile करने, native-image टूल चलाने और नतीजा शुरू करने के चरण पूरे करता है। त्रुटियों के लिए वह reflection, resources और serialization पर संदर्भ गाइड देखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
# Building Native Image
Prerequisites
- Set
JAVA_HOMEto 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
- Compile your Java file with
javac. - Build the Native Image:
$JAVA_HOME/bin/native-image <app-name> - Run the resulting executable:
./app-name - If Native Image cannot find your class file, set the classpath explicitly with the
-cpoption.
Troubleshooting
Reachability Metadata
If you encounter runtime errors related to reflection, JNI, resources, serialization, or dynamic proxies, consult references/reachability-metadata.md before attempting a fix. Use this reference for:
NoClassDefFoundErrororMissingReflectionRegistrationErrorMissingJNIRegistrationErrorMissingResourceException(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.
Reference Files
| Topic | File |
|---|---|
| Native Image CLI options | references/native-image-options.md |
| Missing reachability metadata | references/reachability-metadata.md |
अक्सर पूछे जाने वाले सवाल
क्या इस स्किल के लिए GraalVM इंस्टॉल होना ज़रूरी है?
हाँ। स्किल को JAVA_HOME को GraalVM इंस्टॉलेशन की ओर इशारा करना चाहिए, और AI को पता न हो तो वह उसका पथ पूछेगा।
यह किस तरह की त्रुटियों में मदद करती है?
reflection registrations, JNI registrations और missing resource bundles जैसी त्रुटियों में।
क्या यह build विकल्प बदलने में मदद कर सकती है?
हाँ। इसमें classpath, output नाम, platform target आदि के Native Image command-line विकल्पों का संदर्भ है।
जानकारी
लेखक का मूल विवरण
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.
repo: oracle/graal
लोकप्रियता
- GitHub स्टार
- 22k
- रैंकिंग में स्थान
- #10358
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
build-native-image-gradle
22kआपके एजेंट को Gradle से Java ऐप्स को तेज़ GraalVM native images में बनाने में मदद करती है, और आम build या runtime समस्याएँ ठीक करती है।
build-native-image-maven
22kआपके एजेंट को Maven से Java ऐप्स को GraalVM native images में बनाने, pom.xml सेट करने, native tests चलाने और build समस्याएँ ठीक करने में मदद करती है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।