NetBeans IDE for Groovy Purists

The Groovy support in NetBeans IDE is based on two use cases. In the first case, you're a Java programmer and want to use Groovy as a support language; therefore, in this scenario, you'll create a Java project and then add Groovy artifacts (Groovy classes and scripts) and go from there. In the second case, you're using Grails, in which case you'll go to the Groovy category in the New Project wizard (Ctrl-Shift-N) and create a Grails project and continue developing from that point onwards.

But what about if you don't care about Java and you don't care about Grails? You simply want to write Groovy scripts, compile them, debug them, and run them.

Download this plugin and install it into NetBeans IDE 7.3.1, which is the latest stable release of NetBeans IDE, though it may work in later versions of NetBeans IDE too:

Either install the plugin into the All distribution of NetBeans IDE 7.3.1 or first install the "Groovy & Grails" plugin (via Tools | Plugins) into any other download bundles of NetBeans IDE.

Now you have this new project available in the New Project wizard:

(Sorry for typo "Wheen" in above, will fix in next release...)

Complete the wizard and you should see this:

In other words, you have no Java source files at all, just a Groovy script, and the Groovy JAR (which you can change in the Project Properties dialog) and the JDK (which can also be changed in the Project Properties dialog).

Open the file and you see a Groovy editor:

Right-click in the left margin (or click on a line number) and you can set a breakpoint, visualized by a red line. Then start the Debugger (there's a Debug menu in the main menubar, take a look there).

Hope that helps Groovy purists get started with NetBeans IDE! Feedback welcome, e.g., let me know what other content you'd like the Groovy project to have.

Now go here to read about the latest Groovy features in NetBeans IDE:

In other news. I'm on vacation until Monday 5 August, if you don't hear from me before then, now you know why!


Great support for groovy on Netbeans. Good reason to try switching to Netbeans from Eclipse.

Posted by john on October 06, 2013 at 05:44 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« April 2014