为什么java.lang.VerifyError是什么意思? [英] Why does java.lang.VerifyError mean?
问题描述
尽管我尝试将以下代码段与Groovy 运算符结合使用,以说明发生了 VerifyError .你们有什么想法吗?
While I've tried to use the following code snippet with the Groovy in-operator explanation the VerifyError has occured. Have you guys any idea about?
代码和控制台输出如下.
The code and console output is below.
class Hello extends ArrayList {
boolean isCase(Object val) {
return val == 66
}
static void main(args) {
def myList = new Hello()
myList << 55
assert 66 in myList
assert !myList.contains(66)
}
}
错误日志:
Exception in thread "main" java.lang.VerifyError: (class: Hello, method: super$1$stream signature: ()Ljava/util/stream/Stream;) Illegal use of nonvirtual function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:259)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:116)
代码源自主题 Groovy如何在接线员工作?.
更新:
Groovy版本:1.8.6 JVM:1.6.0_45供应商:Sun Microsystems Inc.操作系统:Linux
Groovy Version: 1.8.6 JVM: 1.6.0_45 Vendor: Sun Microsystems Inc. OS: Linux
推荐答案
检查一下.它用于Java,但通常存在的问题是您使用的库版本错误.该类在那里,但是版本与预期不同.
Check this out. It's for Java, but generally problem is, that you are using wrong library versions. The class is there, but different version than expected.
http://craftingjava.blogspot.co.uk/2012/08/3-reasons-for-javalangverfiyerror.html
可能您搞砸了Groovy或Java SDK的安装.
Probably you have messed up Groovy or Java SDK installations.
这篇关于为什么java.lang.VerifyError是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!