Using grovoy++ in GroovyConsole

8 vues
Accéder directement au premier message non lu

Hamlet D'Arcy

non lue,
9 mai 2011, 15:47:4909/05/2011
à 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

non lue,
9 mai 2011, 18:01:2409/05/2011
à 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

non lue,
10 mai 2011, 03:23:4610/05/2011
à 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




Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message