Geertjan's Blog

  • October 29, 2007

Groovy on the NetBeans Platform!

Geertjan Wielenga
Product Manager
A first experiment—I created a module suite, added a library wrapper containing the Groovy JAR, another library wrapper containing the JAR of the Groovy-Java-mixed application I created earlier, and then a new module with a TopComponent that calls the Groovy class in the aforementioned Groovy-Java-mixed application. This is exactly how one works with web service clients on the NetBeans Platform (i.e., create the JAX-WS client stubs in a standard Java application and then wrap that JAR in a library wrapper module which is then attached to a module suite that contains another module which calls into the JAX-WS library wrapper). In this case, the ported application has the following result:

The most perfect way of working with Groovy on the NetBeans Platform would be to abandon Java source files altogether and to write purely in Groovy files. (Since Groovy is a superset of Java, one could then still continue writing Java, but one would then have the option of writing in Groovy as well.) I tried this, but haven't succeeded yet. Related to this, here's my contentious statement of the week (and it is only Monday): I don't think NetBeans IDE needs a Groovy Editor at all. It "simply" needs its Java Editor to support Groovy...

Join the discussion

Comments ( 3 )
  • Scott Hickey Monday, October 29, 2007

    I like how you're thinking about this!

  • Jesse Glick Monday, October 29, 2007

    Groovy is a quite different language from Java and would need a separate editor. (It is not a superset, either, as you will find if you try simply evaluating "new java.util.ArrayList<String>().")

  • Geertjan Tuesday, October 30, 2007

    Hi Jesse. The question of generics in Groovy is interesting. I guess there are various aspects to Java for which there is no support in Groovy. But that doesn't mean that those aspects won't be provided in the future.


    Hi Scott, thanks!

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.