Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] calling .net

grkuntzmd

2008-08-22

Replies: Find Java Web Hosting

Author LoginPost Reply

I am trying to run the example of calling the .net framework from Groovy.

Here is my Groovy code (saved in callcli.groovy and compiled with groovyc):

#!/usr/bin/env groovy

cli.System.Console.WriteLine('hello world')

I ran the following comand:

ikvm -cp '.;C:\Groovy\embeddable\groovy-all-1.5.6.jar' callcli

and got the following error:

Exception in thread "main" groovy.lang.MissingPropertyException: No such property: cli for class: callcli
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getGroovyObjectProperty(ScriptBytecodeAdapter.java:537)
        at callcli.run(callcli.groovy:3)
        at java.lang.reflect.Method.invoke(Method.java:625)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
        at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:778)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
        at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:401)
        at java.lang.reflect.Method.invoke(Method.java:625)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1105)
        at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
        at callcli.main(callcli.groovy)

What are the actual steps to make this work?

Thanks, Ralph

G. Ralph Kuntz, MD
Chief Software Architect
meridianEMR, Inc.


View this message in context: calling .net
Sent from the groovy - user mailing list archive at Nabble.com.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.