Paul Krill
Editor at Large

Groovy 5 expands Java and JDK support

Latest release of the JVM language also features hundreds of new and improved extension methods including 10x faster arrays.

man jumping agile change jump celebrate dance flexible by frank mckenna unsplash
Credit: frank mckenna

The Apache Groovy team has announced Groovy 5, an update to the JVM-based programming language that features broader JDK (Java Development Kit) support, along with hundreds of new and improved extension methods including faster arrays.

Developers can download Groovy 5 from groovy.apache.org. Unveiled August 24, Groovy 5 brinks full compatibility with JDK versions 11 through 25, according to release notes. Additionally, support is offered for many JDK 17 through JDK 25 language features that are available for use on earlier JDKs. Groovy 5 also features support for compact source files and instance main methods, a Java proposal intended to make it easier for beginning Java programmers to write their first programs, and pattern matching for instanceof.

Groovy 5 also boasts more than 350 new and improved extension methods to boost productivity, according to release notes. Array operations are as much as 10 times faster. Lazy iterator methods offer stream-like behavior without the overhead, while new utilities beyond the standard JDK are featured for richer, out-of-the-box functionality, the Groovy team said. Groovy 5 also offers enhanced web creation with both Jakarta EE and legacy Javax support. A new type checker, meanwhile, enables stronger-than-Java format string checking. Additional language benefits include infinite iterator generation as well as index variables in loops.

AST (abstract syntax tree) transforms have been improved in Groovy 5 via a new @OperatorRename transform for seamless operator overloading in third-party libraries. REPL also has been revamped, with colorized syntax highlighting and intelligent output. Groovy 5 has been tested on JDK versions 11 through 25. Groovy 5 requires JDK 17 or later to build, while JDK 11 is the minimum version of the JRE (Java Runtime Environment) that is supported.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorldโ€™s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorldโ€™s audience of software developers and other information technology professionals. Paul has won a โ€œBest Technology News Coverageโ€ award from IDG.

More from this author