初始化类路径时出错:无法从'11 .0.3'确定Java版本。 Grails运行应用

时间:2019-07-07 08:33:25

标签: java grails

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

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

2 个答案:

答案 0 :(得分:2)

Grails-3.3.x仅支持JDK-7 / 8。根据Grails文档,Grails-4已通过jdk-11认证

答案 1 :(得分:0)

Grail 3.x支持jdk 7和8。我将jdk版本降级为8,现在错误已解决。