title: Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: /usr/local/java/jdk1.8.0_05
body: <p>I'm using gradle 2.9, intellij and Win10 for spring development. In one particular project I encountered this error:</p>
  <pre class="lang-none prettyprint-override"><code>Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: /usr/local/java/jdk1.8.0_05
  </code></pre>
  <p>Neither
  <a href="https://stackoverflow.com/questions/22307516/gradle-finds-wrong-java-home-even-though-its-correctly-set">solution 1</a>  nor <a href="https://stackoverflow.com/questions/26882221/gradle-does-not-recognize-the-java-home-i-have-set">solution 2</a> work for me.</p>