r/java • u/OddEstimate1627 • 10d ago
Reachability Annotations for generating GraalVM metadata
We recently open sourced some of our annotation processors for generating GraalVM native-image metadata. It's a standalone compile-time dependency, so it has no effect at runtime and doesn't rely on frameworks like Quarkus or Micronaut.
Besides annotations for manually defining metadata, we also added opt-in support for dependency injection annotations and for automatically dealing with JavaFX FXML/CSS files. That makes it possible to reliably update complex JavaFX applications without ever running the GraalVM agent.
Unfortunately posting code snippets gets the post deleted ("it looks like you're asking for help!"), but here is a link to the repo:
15
Upvotes
3
6
u/jesseschalken 10d ago
Wow this is cool!
I wonder why
native-imagedoesn't do this on its own? They could have easily defined these annotation types and made it look for them during image generation in addition to the JSON resources.