Dashboard > GridGain User Guide > Table Of Contents > Examples Gallery > Groovy Configuration And Setup
Groovy Configuration And Setup
Added by link, last edited by morpheus on Feb 02, 2009  (view change)
Labels: 
(None)


GridGain comes with a set of groovy examples. Examples' source code, necessary configuration and Javadoc are located in ${GRIDGAIN_HOME}/examples/groovy folder. All examples come with fully documented source code.

Groovy version

All groovy examples scripts used for groovy-1.5.7 version. If you have a different Groovy version, change all scripts in ${GRIDGAIN_HOME}/examples/groovy folder according your own groovy installation.

Install Groovy

Download last Groovy installation distributive.

Enviroment variable GROOVY_HOME must point to Groovy installation folder.

Compile Examples

Incorrect gridgain.jar name in groovy examples scripts in 2.1.0 release

Groovy Gridgain 2.1.0 release contains incorrect jar name in compile*.{sh|bat} scripts.
Please change name gridgain.jar to gridgain-2.1.0.jar or create symbolic link under ${GRIDGAIN_HOME} as follows
'ln -s gridgain-2.1.0.jar gridgain.jar'

Compile all groove examples before running.
All compile scripts compile*.{sh|bat} placed in ${GRIDGAIN_HOME}/examples/groovy folder.

NetBeans Instructions for Groovy Examples

1 Install Netbeans 6.5

2 Install plugin "Groovy and Grails" and restart Netbeans. In NetBeans menu you can go to Tools->Plugins and search for 'groovy'. Then select found item and press Install.

3 Create Java project (for example, JavaApplication1) and select Project Properties.
Turn on checkbox "Enable Groovy" for Build->Groovy

4 Add examples groovy sources $GRIDGAIN_HOME/examples/groovy as project sources.

5 Download and unpack Groovy (for example, groovy-1.5.7) and create Custom Library named as Groovy-1.5.7 which contains only one $GROOVY_HOME/embeddable/groovy-all-1.5.7.jar JAR file.

6 Add custom library Groovy-1.5.7 and all GridGain libraries to your project.

7 Select any groovy class with main (for example, org.gridgain.grid.groovy.examples.helloworld.api.GridHelloWorldGroovyExample.groovy) and run (Run->Run File).

Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.10 Build:#528 Nov 29, 2006) - Bug/feature request - Contact Administrators