How to run the agent (generic Java) and where the metadata is used

GraalVM Native Image Agent — reachability metadata: how to run it, where files go

In short Run the app java -agentlib:native-image-agent=config-output-dir=./graalcnf/ -jar target/app.jar Copy the generated files from ./graalcnf/ to the project under src/main/resources/META-INF/native-image/<groupId>/<artifactId>/ Build the native image mvn -ntp package -Pnative -DskipTests TLDR Native Image needs reachability metadata so it can include dynamic features your app uses at run time (reflection, resources, proxies, serialization, JNI). The simplest way to get this metadata is to run your app on the JVM with the Native Image Agent and then use the generated JSON files during the native build. ...

September 16, 2025 · 2 min · Özkan Pakdil

Ktor build with graalvm

I wanted to test ktor.io with graalvm build, main problem is all code I found using gradle and my project is using mvn here is the code. like other modules I needed to create reflect config json, otherwise ktor serialize is not working properly with graal and when I send a request to “/hello” endpoint I got empty response. I tried to write myself but did not work and at the end I used command below ...

November 13, 2022 · 1 min · Özkan Pakdil