在Eclipse Juno中运行Groovy时异常java.lang.IncompatibleClassChangeError [英] Exception java.lang.IncompatibleClassChangeError while running Groovy in Eclipse Juno

查看:140
本文介绍了在Eclipse Juno中运行Groovy时异常java.lang.IncompatibleClassChangeError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近下载了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版本(靛蓝)或从命令行运行。然而,在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 Libraries已经在类路径上了。

Note that "Groovy Libraries" are already on classpath.

现在我在这里做错什么?

Now what am i doing wrong here?

推荐答案

在最新的groovy /依赖罐子?

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和中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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆