To build run command:
./mvnw clean package -Dnative
To execute:
target/native-build-1.0.0-SNAPSHOT-runner
GraalVM options explains:
-J--add-exports=java.base/sun.security.x509=ALL-UNNAMED
- export proprietarysun
api, quarkus native build plugin does not do this by default (required fornet.i2p.crypto:eddsa:0.3.0
)--initialize-at-run-time=io.nats.client.support.RandomUtil
,--initialize-at-run-time=java.security.SecureRandom
- Force runtime class initialization for RNG.--initialize-at-run-time=io.nats.client.NUID
- Force runtime class initialization for a name generator, otherwise anonymous consumers(like KV watchers) always will have the same name.