Continuing the discussion from Wrong JDK version returned by compileJava toolChain:
Here’s my gradle -version output:
Build time: 2014-11-24 09:45:35 UTC
Build number: none
Ant: Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_40 (Oracle Corporation 25.40-b25)
OS: Windows 7 6.1 amd64
I understand that toolChain is for internal use, so I probably shouldn’t be using it. I think I already moved along to another solution for this build so it’s not an issue at the moment.
But to be clear, I’m not doing cross compilation. I’m just reporting my observation that Gradle says it is running in the JDK when it is running in the JRE. That’s incorrect information and may cause problems down the road like it did for me.
Thanks! That makes sense.
toolChain has been removed for 2.4, so there won’t be something tempting to give you the wrong information. We’re working on being able to resolve different versions of the Java compiler tool chain than the one you run Gradle with (that’s not there yet). As part of the tool resolving step, we’ll only look for JDK installations (so the JDK prefix will make sense then).