Use RUNTIME_JAVA_HOME for micro benchmarks
We don't honour RUNTIME_JAVA_HOME for running the benchmarks. It's useful to run some of the
benchmarks against older JDKs, though.
@@ -45,6 +45,8 @@ compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-u
// needs to be added separately otherwise Gradle will quote it and javac will fail
compileJava.options.compilerArgs.addAll(["-processor", "org.openjdk.jmh.generators.BenchmarkProcessor"])
+run.executable = new File(project.runtimeJavaHome, 'bin/java')
+
// classes generated by JMH can use all sorts of forbidden APIs but we have no influence at all and cannot exclude these classes
forbiddenApisMain.enabled = false
