Saturday, 12 January 2019

Install and setup Groovy


Download Groovy software from below location.

At the time of writing this tutorial, groovy 2.5.3 is the latest version.

Extract the downloaded zip file, you can see below kind of project structure.




Add the bin directory path to your system path.

Open terminal (or) command prompt and execute the command ‘groovy’. You can see below kind of output in console.

C:\>groovy
error: neither -e or filename provided
Usage: groovy [options] [filename] [args]
The Groovy command line processor.
      -cp, -classpath, --classpath=<path>
                             Specify where to find the class files - must be first
                               argument
  -D, --define=<property=value>
                             Define a system property
      --disableopt=optlist[,optlist...]
                             Disables one or all optimization elements; optlist can
                               be a comma separated list with the elements:
                             all (disables all optimizations),
                             int (disable any int based optimizations)
  -d, --debug                Debug mode will print out full stack traces
  -c, --encoding=<charset>   Specify the encoding of the files
  -e= <script>               Specify a command line script
  -i= [<extension>]          Modify files in place; create backup if extension is
                               given (e.g. '.bak')
  -n                         Process files line by line using implicit 'line'
                               variable
  -p                         Process files line by line and print result (see also
                               -n)
      -pa, --parameters      Generate metadata for reflection on method parameter
                               names (jdk8+ only)
  -l= [<port>]               Listen on a port and process inbound lines (default:
                               1960)
  -a, --autosplit[=<splitPattern>]
                             Split lines using splitPattern (default '\s') using
                               implicit 'split' variable
      --indy                 Enables compilation using invokedynamic
      --configscript=<script>
                             A script for tweaking the configuration options
  -b, --basescript=<class>   Base class name for scripts (must derive from Script)
  -h, --help                 Show this help message and exit
  -v, --version              Print version information and exit




Previous                                                 Next                                                 Home

No comments:

Post a Comment