Reputation: 1414
I'm trying to figure out how to use the GraalVM native image agent with a Quarkus app running via mvn quarkus:dev
.
I tried running:
mvn quarkus:dev -Djvm.args="-agentlib:native-image-agent=config-output-dir=native-image-config"
However I get the error:
ERROR: JDWP unable to get necessary JVMTI capabilities.
Any tips?
My version of Java:
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03)
OpenJDK 64-Bit Server VM GraalVM CE 20.2.0 (build 11.0.8+10-jvmci-20.2-b03, mixed mode, sharing)
Upvotes: 2
Views: 1434
Reputation: 3790
By default mvn quarkus:dev
enables debug with -Xrunjdwp
, something like -Xrunjdwp:transport=dt_socket,address=0.0.0.0:5005,server=y,suspend=n
Then you stumble upon an issue described in this answer -- in short JDWP and JVMTI don't seem to work together well.
You can disable debug with passing -Ddebug=false
and then it works. Something like this:
mvn quarkus:dev -Ddebug=false -Djvm.args="-agentlib:native-image-agent=config-output-dir=native-image-config"
Upvotes: 4