Groovy Eclipse Ganymede Installation and Setup Step 2
This post is to show you how to install Groovy with Eclipse.
To get the most recent groovy plugin for Eclipse, select help->software updates and add this website.
http://dist.codehaus.org/groovy/distributions/update/
select the Grails Eclipse Feature and the GroovyFeature. The Groovy TestNG Feature isn't compatible for Eclipse Ganymede
You should download groovy from this website: http://groovy.codehaus.org/Download
Create a Groovy Project in Eclipse called, "GroovyHelloWorld".
Add a lib directory and put all of the jar files you downloaded in the lib directory. My groovy version is groovy-1.6-RC-3.jar.
Set your build path to point to these jar file.
Create a package called com.groovy.home and in that package create a class called HelloWorld.groovy. To create a groovy class, you can select the right mouse button on your project->new->other->Groovy Class. Select the public static void main to include a main function.
In the main method, type this code:
println "test"
You can select your right mouse button and select run->Groovy.
If you see "test" print in your console, you have successfully installed Groovy.

0 comments:
Post a Comment