title: Grails Error initializing classpath: Could not determine java version from '10.0.2'
body: <p>I'm new to Grails and developing with Java. I'm having an issue where I have Java 8 set up as my JAVA_HOME environment variable but Grails is not recognizing it. How do I configure Grails to use Java 8?</p>
  
  <p>Stack Trace:</p>
  
  <pre><code>Error Error initializing classpath: Could not determine java version from '10.0.2'.
  java.lang.IllegalArgumentException: Could not determine java version from '10.0.2'.
      at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:68)
      at org.gradle.api.JavaVersion.current(JavaVersion.java:78)
      at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(UnsupportedJavaRuntimeException.java:29)
      at org.gradle.tooling.internal.consumer.ConnectorServices.checkJavaVersion(ConnectorServices.java:66)
      at org.gradle.tooling.internal.consumer.ConnectorServices.close(ConnectorServices.java:53)
      at org.gradle.tooling.internal.consumer.DefaultGradleConnector.close(DefaultGradleConnector.java:57)
      at org.grails.cli.gradle.cache.CachedGradleOperation.call(CachedGradleOperation.groovy:78)
      at org.grails.cli.GrailsCli.populateContextLoader(GrailsCli.groovy:526)
      at org.grails.cli.GrailsCli.initializeProfile(GrailsCli.groovy:509)
      at org.grails.cli.GrailsCli.initializeApplication(GrailsCli.groovy:307)
      at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:270)
      at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
  | Error Error initializing classpath: Could not determine java version from '10.0.2'.
  </code></pre>