Background
You may want to go through the previous post on what is groovy and how to set the environment required to run Groovy programs. In this post I will show how to install it's Eclipse plugin.
Getting Started
- In Eclipse go to Help -> Install new Software .
- For the plugin site refer to the Groovy page for Eclipse plugin. The site depends on which version on Eclipse you are using. I am using Juno. So link for me is http://dist.springsource.org/release/GRECLIPSE/e4.2/.
- Select "Groovy-Eclipse" and click on next.
- Check install Details and Click on Next. Accept the agreement and click install. It will take some time to install the plugin depending on your internet bandwidth. You can see the progress at the bottom of Eclipse or from Progress tab.
Create a new groovy Project
- Create a new Groovy project named GroovyTestProject.
- Create a groovy class named GroovyTest.groovy. Enter the following code and then run it as Groovy Script.
class GroovyTest { public static void main(def args){ println("Hello World!") } }
- You should see the output in console.
No comments:
Post a Comment