java中使用GroovyClassLoader加载groovy的错误,急死了。。
蓝色痕迹
2009-09-22
如题
程序: GroovyClassLoader loader = new GroovyClassLoader(); Class fileCreator = loader.parseClass(new File("src/Foo.groovy")); 错误: Exception in thread "main" java.lang.NoSuchMethodError: antlr.ASTFactory.setASTNodeClass(Ljava/lang/Class;)V at org.codehaus.groovy.antlr.parser.GroovyRecognizer.make(GroovyRecognizer.java:226) at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:76) at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:61) at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:249) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:160) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:798) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:278) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:249) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:189) at com.kaikai.test.InvokeGroovy.main(InvokeGroovy.java:17) |
|
JohnnyJian
2009-09-22
用groovy-all.jar试试
|