« Return to Thread: calling .net
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
« Return to Thread: calling .net
| Free embeddable forum powered by Nabble | Forum Help |