AdoptOpenJDK / jitwatch

Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.
Other
3.06k stars 437 forks source link

ReflectionJavap.canUseReflectionJavap() returns true for JDK17 and then fails due to module access denied #335

Closed chriswhocodes closed 3 years ago

chriswhocodes commented 3 years ago

java.lang.IllegalAccessException: class org.adoptopenjdk.jitwatch.process.javap.ReflectionJavap cannot access class com.sun.tools.javap.JavapTask (in module jdk.jdeps) because module jdk.jdeps does not export com.sun.tools.javap to unnamed module @6d9d3c87

Probably best to try reflective JavapTask and catch the exception and fallback to ProcessBuilder.

chriswhocodes commented 3 years ago

Fixed by https://github.com/AdoptOpenJDK/jitwatch/commit/bcb5ba8f3a8ed6385dd33076c239b785f4be9f5b