初始化类路径时出错:无法从"11.0.3"确定 Java 版本。Grails run-app



启动应用程序时,我会收到此错误

F:ProjectsJava ProjectsgrailsAjax>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

Grails-3.3.x仅支持JDK-7/8。从Grails文档中,Grails-4在JDK-11上获得认证

Grail 3.x支持JDK 7和8。我将JDK版本降低到8,现在错误已解决。

最新更新