-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
The github/awesome-copilot repo already contains Java-related prompts and instructions (e.g., java-docs.prompt.md, springboot.instructions.md), but there is currently no dedicated prompt for compiling Java to native executables with GraalVM. Adding one would fit naturally alongside the existing Java solutions.
🔍 What Exists in the Repo
- Java prompts: Files like
[java-docs.prompt.md](https://github.com/github/awesome-copilot/blob/main/prompts/java-docs.prompt.md)provide Copilot guidance for generating documentation in Java projects. - Spring Boot instructions: The repo includes
springboot.instructions.mdfor dependency injection, testing, and modern Java practices. - General Copilot instructions: Many prompts cover containerization, architecture blueprints, and migration guides, but none address GraalVM native-image compilation.
🚀 Proposed Addition: Java Native Compilation Prompt
You could add a new file under /prompts/ named java-native.prompt.md with content like:
# Java Native Compilation with GraalVM
You are a helpful assistant guiding developers to compile Java applications into native executables using GraalVM.
## Instructions
- Ensure GraalVM is installed and `JAVA_HOME` points to it.
- Install the native-image tool:
```bash
gu install native-image
- Compile a JAR into a native binary:
native-image -jar myapp.jar
- Mention benefits: faster startup, lower memory usage.
- Note limitations: reflection and dynamic class loading may require configuration.
- Provide links to [[GraalVM Native Image docs](https://www.graalvm.org/reference-manual/native-image/)](https://www.graalvm.org/reference-manual/native-image/).
✅ Why This Fits
- Consistency: Other languages and frameworks (ASP.NET, Spring Boot, etc.) already have prompts for deployment and optimization.
- Completeness: Java developers using Copilot will benefit from explicit GraalVM guidance.
- Practicality: Native-image is widely used in modern Java ecosystems (e.g., Micronaut, Quarkus, Spring Boot).
Metadata
Metadata
Assignees
Labels
No labels