Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The generated jar contains the compiled groovy script, and the groovy embeddable jar. Moreover the jar's main-class is set to the compiled groovy script.

Havin Having this self-executable jar, you can start the groovy script, like java -jar MyScriptAsJar.jar

You should launch GroovyWrapper in the same directory as where the main-class file resides. This ensures that the jar's main-class does not include path information which will fail when launching via java -jar MyScriptAsJar.jar

Groovy Wrapper Script

The Groovy Wrapper Script below is quite simple.

...