初始化类路径时出错:无法从“11.0.3”确定 java 版本。 Grails 运行-应用程序

Error initializing classpath: Could not determine java version from '11.0.3'. Grails run-app

启动应用程序时出现此错误

F:\Projects\Java Projects\grailsAjax>grails run-app
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/grails-3.3.10/lib/org.codehaus.groovy/groovy/jars/groovy-2.4.17.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
| Error Error initializing classpath: Could not determine java version from '11.0.3'. (Use --stacktrace to see the full trace)

Java版本

C:\>java -version
java version "11.0.3" 2019-04-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)

Grails 版本

C:\>grails -version
| Grails Version: 3.3.10
| JVM Version: 11.0.3

Grail 3.x 支持 jdk 7 和 8。我将我的 jdk 版本降级到 8,现在错误已修复。

Grails-3.3.x 仅支持 JDK-7/8。根据 Grails 文档,Grails-4 在 jdk-11

上获得认证