I'm happy to announce that starting with a prototype written by Tom Ball, Oracle's
javac team has produced and pushed an implementation of the
try-with-resources statement, otherwise known as ARM blocks, into JDK 7.
Today the resourceful can apply a changeset to a copy of the JDK 7
langtools repository and do a build to get a compiler supporting this feature. Otherwise, following the integration process, support for
try-with-resources statements will be available in the promoted JDK 7 builds in due course.
Besides possible refinements to the semantics of the translations, there will likely be other small adjustments to the implementation of the language feature in the future. For example, the lint category named "arm" will likely be renamed to something more like "resource."