Appendix A. Installation and documentation

Installation

The only prerequisite for installing Groovy is that you must first have a 1.4 or 1.5 JDK installed (available free from http://java.sun.com/j2se/) and the JAVA_HOME environment variable set to the location of your JDK installation.

To install Groovy:

  1. Grab the latest stable release from http://groovy.codehaus.org/Download.

  2. Unzip the file to a directory on your filesystem; for example, C:groovy or /home/username/groovy.

  3. We recommend checking whether you have a CLASSPATH variable set in your environment and unsetting it, at least temporarily, to avoid classpath problems, especially if you have any problems running basic Groovy commands.

  4. Optionally, set an environment variable GROOVY_HOME whose value is set to the location where you unzipped the distribution zip file. If you are running your Groovy commands from the standard install location, you should not need to set this variable.

  5. Optionally, include GROOVY_HOME/bin in your PATH environment variable. This will make all the Groovy command-line tools available in your path.

  6. Test your installation by executing groovysh from a command line-shell. You should see output like this:

>groovysh
Lets get Groovy!
================
Version: 1.0-RC-01-SNAPSHOT JVM: 1.4.2_05-b04
Type 'exit' to terminate the shell
Type 'help' for command help
Type 'go' to execute the statements

groovy> exit

Congratulations! That is it for installing. Type exit to end the groovysh program.

Figure A.1 gives an overview of the contents of GROOVY_ HOME, and table A.1 lists the directories and their purpose.

Overview of the GROOVY_HOME directories

Figure A.1. Overview of the GROOVY_HOME directories

Table A.1. Directories in GROOVY_HOME and their contents

Directory

Contents

bin

The executables discussed in this appendix

conf

Startup configuration files

embeddable

A single jar file, which packages Groovy and its dependencies together as a convenience for users embedding Groovy in other applications

lib

The Groovy implementation jars plus all the third-party libraries required for various features

That’s all there is. It looks minimal, and that’s on purpose. You don’t have to deal with any specifics of your operating system, such as messing with the quagmire that is Windows registry. If you decide to “uninstall” Groovy, just delete the GROOVY_ HOME directory, and you’re done.

Obtaining up-to-date documentation

This book aims to provide the necessary documentation for Groovy; however, other sources can provide more detailed, up-to-date, and responsive information. We only list a few starting points here—as the community expands, so will its online output.

Using online resources

Groovy’s home page is http://groovy.codehaus.org/. This is where you can find all the latest information, including

  • Downloads

  • The famous and invaluable Groovy Quick-Reference

  • A short language description and the official Groovy Language Specification (GLS), along with the official Groovy grammar in a browsable format

  • Links to the CVS and Fisheye, the web view to CVS, together with RSS feeds of latest changes for those who prefer to “live on the edge”

  • Links to the continuous integration build server and its feeds

  • The JIRA issue tracker

  • A number of articles, blogs, and tutorials about Groovy on the Web—for example, the popular “Practically Groovy” series.

  • A “Groovy Online Experience” with live running code samples, available soon at http://groovy.canoo.com

Subscribing to mailing lists

For any questions concerning the normal use of Groovy, subscribe to . Other mailing lists (replace user with dev, jsr, or scm) deal with topics of developing the Groovy core, bringing forward the issues of the Java Specification Request (JSR-241), and getting notifications from the CVS system that is used for Software Configuration Management (SCM).

We’re constantly surprised by the responsiveness of these lists and the quality of answers that everybody receives there. All mailing list participants and especially the project manager Guillaume Laforge make this community a fun place to be.

Connecting to forum and chat

The core developers meet for chat at http://irc://irc.codehaus.org/groovy, but everybody else is also welcome. This is like talking with friends in a bar about your favorite programming language. In other words, it’s highly addictive.

For questions about this book, there is a forum at Manning at http://www.manning.com/koenig where you can meet the authors.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.136.186