I'm trying to migrate a Spring Boot, Kotlin project to java 17 from 8.
We are using a communication framework that I'm trying to keep as-is for now.
The library is using reflection to access URL.host and URL.authority
This breaks at runtime with java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.net.URL.host accessible: module java.base does not "opens java.net" to unnamed module @3857f613
I tried adding --add-opens java.base/java.net=ALL-UNNAMED to the java command line but the exception is still raised.
Is there another setting for corretto?
Thanks, Amos
try to use --add-opens java.base/java.net.URL=ALL-UNNAMED
for example it was my solution in similar case (for surefire plugin)