Java 7: What's in it for developers

The long-awaited release got off to a rough start but offers a multitude of improvements for developers

Although the release late last month of Java SE 7 did not come off without a hitch -- serious bugs turned up in the release candidate and had to be fixed in the Update 1 release -- the platform nonetheless offers developers a variety of enticing capabilities that range from programming improvements to boosts for sound applications and multicore systems.

Officially known as Java Platform Standard Edition 7, Java SE 7 is the first big release of Java in more than five years and the first under Oracle's stewardship. It offers improvements for running dynamic languages, programming, and file systems.

[ Discover the top five scripting languages for the JVM. | Get the latest developer news and insights with InfoWorld's Developer World newsletter and hands-on Java advice from the JavaWorld newsletter. ]

Java community politics delayed many new features Java founder James Gosling, who left Oracle in 2010 and had limited involvement in developing Java SE 7, views the upgrade as critical simply because Oracle finally got it done: "Java SE 7 is important not for any particular feature but for the fact that Oracle was able to bust the political logjam in the JCP [Java Community Process] that had delayed it for so very long." Al Hilwa, an ICD analyst, agrees: "The main thing about Java SE is that it shipped. The inertia of five years without a release had to be overcome."

Despite the five years of effort, Java SE 7 is not what had been originally planned. Many features in the original JDK 7 plan have been pushed to JDK 8, which is due in 2012. Java SE 7 is thus in some ways the first of a two-part release. That's not necessarily a bad thing, says Rob Ratcliff, founder of the Austin Java Users Group and a Java developer. "It was good for Oracle to release Java 7 and move onto [Java] 8 later." He prefers the evolutionary approach to Java's development.

Among the delayed capabilities are adding Lambda expressions, or "closures," to Java for multicore programming, language and VM support for modular programming, and a module system for the JDK.

Still, Java SE 7 does offer useful new capabilities today.

Key new capability: Support for dynamic languages A key feature of Java SE 7 is its accommodations for dynamic languages, which are becoming prominent on the JVM lately, thanks to the emergence of languages such as JRuby and Scala. For example, the new InvokeDynamic capability supports implementation of dynamically typed, object-oriented languages. InvokeDynamic bytecode supports "efficient and flexible execution of method invocations in the absence of static type information," says the Java Specification Request 292, the standards document detailing the capability. Hilwa says dynamic language support is the most important feature in the Java SE 7 release because it will help expand the Java ecosystem.

Key new capability: Better multicore and parallelism support A multicore-ready API in the release, from the Fork/Join Framework, lets developers more easily decompose problems into tasks for parallel execution across multiple processor cores. IDC analyst Hilwa calls the multicore and parallels capabilities "the most innovative additions" in Java SE 7, and they will let developers "harness underlying multicore processors better."

Key new capability: Compiler optimizations for developer productivity Developer productivity also is aided in Java SE 7, via Project Coin, which adds language changes to simplify common programming tasks and reduce coding. It clarifies syntax and makes the code easier to read, says Austin User Group chief Ratcliff.

Project Coin's diamond syntax for constructor calls lets the compiler infer type arguments, and the try-with-resources statement helps the compiler make reliable code by automatically closing files, sockets, and database connections when developers forget to do this, Ratcliff says: "That's something that's been tripping up developers -- especially young developers -- for years. That'll be a good productivity improvement and will reduce bugs."

Key new capabilities: File I/O, graphics, and sound boosts "I'm particularly a fan of the NIO2 [file-system capabilities]," says Java founder Gosling. The new NIO2 capabilities provide an interface for working with file systems that can access more file attributes and offer more information about errors, Oracle's documentation says.

Java advocate Peter Lawrey, author of the Vanilla Java blog, cites Sockets Direct Protocol (SDP) capabilities as important for network file I/O. "SDP is really there to improve support for Infiniband," he says. Infiniband is a competitor to iSCSI that has been making some headway in virtualization environments.

Java SE 7 also features the XRender pipeline for 2D graphics rendering; it runs on top of the X Window system and can access modern graphics processors.

A new sound engine, called Gervill, enables multiple applications on Linux to play sound using Audio Synthesis Engine Project MIDI synthesizer.

This story, "Java 7: What's in it for developers," was originally published at InfoWorld.com. Follow the latest developments in programming at InfoWorld.com. For the latest developments in business technology news, follow InfoWorld.com on Twitter.

Read more about application development in InfoWorld's Application Development Channel.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags Oraclesoftwareapplication developmentJava Programming

More about etworkIDC AustraliaLinuxO2OracleRequest DSLScala

Show Comments
[]