启动Grails 3.3.8应用程序时无法从'10 .0.2'确定Java版本

时间:2018-09-18 07:32:48

标签: grails intellij-idea

我刚刚安装了Grails 3.3.8,但是当我尝试运行示例应用程序时,出现以下错误:

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'.

Process finished with exit code 1

我的Java版本是 java版本“ 10.0.2” 2018-07-17 ,Windows 10 64位,已经设置了 JAVA_HOME 并使用了intellj

1 个答案:

答案 0 :(得分:4)

Grails 3.3.8不支持Java10。如果要使用Grails 3.3.8,则必须使用Java 7或Java 8。