How to invoke groovy with 'java' from command line?

I think you need to explicitly list the groovy jar in the classpath.

You have here another example of Groovy app called from Java (in this case, from ant, but the general idea is the same). Java -cp ...;%GROOVY_HOME%/embeddable/groovy-all-1.5.4. Jar;.. As mentioned by frankowyer, you have the exact groovy jar explicitly listed on the classpath arguments of the java.

Since your clients do not have special environment variable, just replace the %GROOVY_HOME%/... with the complete path to: groovy. Jar or goovy-all-VERSION. Jar (to minimize any conflict with other libraries).

One way to avoid problems with different class paths on different machines would be to bundle all the necessary dependencies into one single jar, this would also make distribution to users easier. This can be done with this 'GroovyWrapper' script. The default jars (embeddable/groovy-all-.

Jar and lib/commons. Jar) are included by default in the script and if you require other JARS they can easily be added. See docs.codehaus.org/display/GROOVY/Wrappin... for the full script and instructions.

Here's an example of how to use GroovyWrapper: Say you have groovy script groovy, use GroovyWrapper for building jar, as follows: $ groovy GroovyWrapper -c -m World GroovyWrapper will compile the script groovy to class, and creates a self-executable jar jar. Now you can use the jar for launching the simply by running: $ java -jar jar.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions