So I create a groovy jar but I'm not able to run it.
I'm using HelloWorld.groovy as an example
class HelloWorld {
static main(args) {
println("Hello World");
}
}
I save it as a jar like I would with any java file via export in eclipse/ggts:
Now I try to run HelloWorld.groovy via java -jar HelloWorld.jar on my command line.
I get: Exception in thread "main" java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
When I export it also allows me to export .classpath into my jar. Shouldn't that include my groovy-all.jar that my GGTS is using? Am I missing something?
I've been successful with using GroovyWrapper to create groovy jars. I want to see if it's possible with just my IDE.
I think that in eclipse you export an executable jar and that gives the option to package the dependencies?