Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Groovy native launcher

The groovy native launcher is a native program for launching groovy scripts. It compiles to an executable binary file, e.g. groovy.exe on windows.

To use the native launcher, you need to set the GROOVY_HOME environment variable. If you do not use -jh / --javahome option (see below), JAVA_HOME needs to be set also.

The native launcher accepts accepts the same parameters as the .bat / shell script launchers, and on top of that
-jh / --javahome <path to your jdk / jre> - makes groovy use the designated jre / jdk instead of the one pointed to by JAVA_HOME. Any jdk / jre >= 1.4 should work

Any options not recognized as options to groovy are passed on to the jvm, so you can e.g. do

groovy -Xmx250m myscript.groovy

The -client (default) and -server options to designate the type of jvm to use are also supported, so you can do

groovy -Xmx250m -server myscript.groovy

Note that the environment variable JAVA_OPTS that the .bat/shell script launchers use is ignored.

The native launcher should support any platform and any jdk / jre. If you find something that is not supported, please post a JIRA enhancement request and support will be added.

At the moment, the following platforms have been tested:

  • Windows XP
  • linux (SuSE & Ubuntu) on x86
  • solaris on sparc

At the moment, the following jdks / jres have been tested

  • several versions of sun jre / jdk
  • jrockit


The binaries are compiled w/ the provided rant script. Just type

As the executable finds groovy's home dir using the env var GROOVY_HOME, it does not really matter where the executable is located. For consistency, it is best to locate it in ${GROOVY_HOME}/bin. Also, in the future the executable may assume that it is in that directory if GROOVY_HOME is not set.

Pre-compiled binaries

Precompiled binaries are unfortunately not yet available. Hopefully they will be soon.

  • No labels