Java coders get Groovy language

Maartje van Caspel

Java programmers who want the flexibility of new languages such as Ruby now can have the best of both worlds, with an emerging language called Groovy, according to a presentation given last week at the Northern Virginia Java Users Group.

Groovy closely resembles Java yet also has the dynamic nature of scripting languages such as Ruby or Python, said Michael Aube, a senior presales engineer at CA Wily Technology, who made the presentation.

Groovy uses the same object and runtime model as Java and handles class, inheritance, field and method definitions the same way. This allows Groovy programmers to use all Java application program interfaces within their own code.

Because Groovy so closely resembles Java, Java programmers can get up to speed on Groovy quickly. Like many scripting languages ' and unlike Java itself ' Groovy allows for dynamic typing, or the freedom not to assign specific data types to variables before the code is run.

As a result, the language is good for trying out new ideas quickly, Aube said. 'It's ideal for rapid prototyping,' he said. 'You can run Groovy commands directly from a command-line shell or run Groovy scripts within a Groovy console.'

'When you run a Groovy script, it is compiled down to the Java bytecode and'runs inside' the Java Virtual Machine, Aube added.

About the Author

Joab Jackson is the senior technology editor for Government Computer News.


  • Records management: Look beyond the NARA mandates

    Pandemic tests electronic records management

    Between the rush enable more virtual collaboration, stalled digitization of archived records and managing records that reside in datasets, records management executives are sorting through new challenges.

  • boy learning at home (Travelpixs/

    Tucson’s community wireless bridges the digital divide

    The city built cell sites at government-owned facilities such as fire departments and libraries that were already connected to Tucson’s existing fiber backbone.

Stay Connected