初始化类路径时发生Grails错误:无法从'10 .0.2'确定Java版本

时间:2018-09-03 22:15:06

标签: java grails3

我是Grails的新手,正在开发Java。我遇到一个问题,其中将Java 8设置为我的JAVA_HOME环境变量,但是Grails无法识别它。如何配置Grails以使用Java 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'.

0 个答案:

没有答案