【发布时间】:2019-03-22 07:28:29
【问题描述】:
我最近安装了 groovy。
C:\Users\Shivendra Gupta>groovy -v
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/D:/IT%20Softwares/groovy-3.0.0-alpha-4/lib/groovy-3.0.0-alpha-4.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
Groovy Version: 3.0.0-alpha-4 JVM: 11.0.2 Vendor: Oracle Corporation OS: Windows 10
现在当我运行 groovysh 命令时出现错误:
此外,当 groovyConsole 行为异常时:-
我认为非法反射访问警告可能是由于与 jdk 11 的兼容性问题。这是否意味着我将无法使用 jdk 11 进行 groovy?有没有人遇到过类似的问题?我该如何解决这个问题?
编辑: 我刚刚安装了 java 9。我在 groovysh 和 groovyConsole 命令上遇到了完全相同的错误,并且在 runnung groovy -v 命令上也收到了同样的警告
【问题讨论】:
标签: java groovy java-11 groovyshell groovy-console