Affects Version/s: None
Fix Version/s: 1.3-rc-1
I'm currently running into a strange problem with Java 1.7 under Mac OS.
I have set the JDK 1.7 path in my gradle.properties file like this:
When I run a full build for my scala project, I get
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':compileScala'.
> Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre"
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(Note aside: this happens because there are also java sources in the scala source path. If there are only scala source files, everything is fine)
So the question is: why is gradle using the JRE and not the JDK path (since gradle.properties points to the JDK)
I have no JAVA_HOME set. The java command on the path, is a java 1.6.
However, after setting
the problem is gone.
Nevertheless I would expect that providing
should be enough.