Wrong JDK version returned by compileJava toolChain

project.compileJava.toolChain.getName() returns JDK1.8 but I do not have JDK 1.8 installed!!

I have JRE 1.8 and JDK 1.7.

It’s using the version of Java that is running the build. The ‘toolChain’ method is internal and doesn’t support cross compilation yet.

Uhuh. This is a problem though… because it is returning the string “JDK1.8” which is not the version of Java running Gradle. It would be more correct to return “JRE1.8”

Can Gradle compile Java when running under the JRE?

The JDK string is hardcoded because we haven’t spent much time on cross compilation. I imagine it’ll change. I believe we need the tools.jar which is only available with the JDK. What does gradle -version tell you?