Using grovoy++ in GroovyConsole

8 views
Skip to first unread message

Hamlet D'Arcy

unread,
May 9, 2011, 3:47:49 PM5/9/11
to groovyp...@googlegroups.com
Is it possible to use Groovy++ from the standard GroovyConsole? I
can't get it to work.

I manually added groovypp-all:0.4.231_1.8.0 to my classpath.

If my script is called test.gpp and contains:
println 'hello world'
Then I get
java.lang.NoClassDefFoundError: groovyjarjarasm/asm/Opcodes
at java.lang.ClassLoader.defineClass1(Native Method)

If I then add the groovy-all 1.8x jar then I get a different exception:

java.lang.AbstractMethodError
at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:266)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructor(ClassCodeVisitorSupport.java:119)
at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructor(AsmClassGenerator.java:361)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1052)

Any ideas on how to run this in GroovyConsole?

--
Hamlet D'Arcy
haml...@gmail.com

Alex Tkachman

unread,
May 9, 2011, 6:01:24 PM5/9/11
to groovyp...@googlegroups.com
Probably you need to use groovypp-0.4.231_1.8.0.jar instead of
groovypp-all and do not add groovy-all.jar at all

Peter Ledbrook

unread,
May 10, 2011, 3:23:46 AM5/10/11
to groovyp...@googlegroups.com
Is it possible to use Groovy++ from the standard GroovyConsole? I
can't get it to work.

I manually added groovypp-all:0.4.231_1.8.0 to my classpath.

I used:

    groovyConsole --classpath ~/Downloads/groovypp-all-0.4.231_1.8.0.jar:/opt/java/groovy-1.8/embeddable/groovy-all-1.8.0.jar 

Seemed to work fine.

HTH,

Peter

--
Peter Ledbrook
Grails Advocate
SpringSource - A Division of VMware




Reply all
Reply to author
Forward
0 new messages