在 Eclipse Juno 中运行 Groovy 时出现异常 java.lang.IncompatibleClassChangeError [英] Exception java.lang.IncompatibleClassChangeError while running Groovy in Eclipse Juno
问题描述
我最近下载了 Eclipse Juno 并安装了最新的 Groovy 插件.
I have recently downloaded Eclipse Juno and installed latest Groovy plugin.
现在这是我的 Groovy 文件的样子.
Now here is how my Groovy file looks like.
package groovy_support
class TimePass {
static void main(def args){
println "Hello World"
}
}
当我从以前的 Eclipse 版本 (indigo) 或命令行运行它时,它会运行.但是,在 Eclipse Juno 上,它在 Eclipse 控制台上抱怨以下异常.
When i run this from either my previous eclipse version (indigo) or from command line, it runs. On Eclipse Juno, however, it complains with following exception on Eclipse console.
Caught: java.lang.IncompatibleClassChangeError: Found class org.objectweb.asm.ClassVisitor, but interface was expected
java.lang.IncompatibleClassChangeError: Found class org.objectweb.asm.ClassVisitor, but interface was expected
请注意,Groovy 库"已经在类路径上.
Note that "Groovy Libraries" are already on classpath.
现在我在这里做错了什么?
Now what am i doing wrong here?
推荐答案
您是否在使用最新的 groovy/依赖 jars?.
Are you on the latest groovy/dependent jars? .
java.lang.IncompatibleClassChangeError
由于向后兼容性问题而发生.客户端代码需要重新编译才能解决.
The java.lang.IncompatibleClassChangeError
happens due to back ward compatibility issues.
The client code needs to be recompiled to resolve it.
您看到的具体错误是因为 org.objectweb.asm.ClassVisitor
是一个 接口 asm 3.2 和 Class 在 asm 4.0 以后.
The specific error you are seeing is because org.objectweb.asm.ClassVisitor
is an Interface in asm 3.2 and a Class in asm 4.0 onwards.
这篇关于在 Eclipse Juno 中运行 Groovy 时出现异常 java.lang.IncompatibleClassChangeError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!