मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)22k · #10358

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 पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/skills/building-native-image/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

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

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

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills