Java – Running Gradle project via Eclipse errors “system Cannot find System Java Compiler”

eclipsegradlegradle-eclipsejava

When I run Gradle project via Eclipse I get below error.

system Cannot find System Java Compiler.

Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.

Could not execute build using Gradle installation 'C:\gradle-1.2-all\gradle-1.2'.

But I have installed JDK 1.7 and set the JAVA_HOME environment variable.

Best Answer

Go to File -> Other Settings -> Default Project Structure

enter image description here

Now Set your JDK location

enter image description here