I second the recommendation of using
"-Dsun.reflect.debugModuleAccessChecks=true". We use gradle to build
JavaFX and I ended up needing the following to allow our build to run
with jdk-9+148:
export _JAVA_OPTIONS="-Dsun.reflect.debugModuleAccessChecks=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED"
-- Kevin
Stephen Felts wrote:
I would highly recommend running with
_JAVA_OPTIONS=-Dsun.reflect.debugModuleAccessChecks=true
It will tell you what add-options are required.
One minor downside is that it will produce the warning in cases where the
software is already correctly handling the exception from setAccessible, so
there can be noise.