Open razorree opened 4 years ago
The error message is probably misleading here: the plugin needs to do some dirty hacks to configure JMH and requires access to the Field
class, which has apparently changed in JDK 14. /cc @oehme :(
Yeah, this is frustrating. I think it might be the best to just replace this whole thing with a javaexec
call that runs the relevant JMH main class instead of trying to run things in a worker process. It's a shame that JMH is not embeddable, but for some reason expects its configuration to be on the system classloader.
This appears to happen for me only when I run JDK 14 or 15, so using https://github.com/shyiko/jabba is enough to work around it:
jabba use adopt@1.8.0-252
or
jabba use adopt@1.11.0-7
I've commented regarding this problem. https://github.com/melix/jmh-gradle-plugin/issues/90#issuecomment-744032865
It's seems tat current Issue is more relevant to my comment.
@wsargent it's not good option to use old JDK. Or you are referencing to cross-compilation, using different JDK for for gradle and for the build?
sourceCompatibility = 1.8
targetCompatibility = 1.8
...
is there any way to avoid this issue with jdk 8?
When i try to run super simple configuration, i have errors from jmh task. My build.gradle:
and exceptions when i run ./gradlew jmh
Gradle 6.6.1, JDK 14.0.2