Java 7 Feature Guide

A good concise guide to all the jdk7 enhancements can be found here. Some interesting ones are –

Scalable file I/O support
Many of the methods did not scale. Requesting a large directory listing over a server could result in a hang. Large directories could also cause memory resource problems, resulting in a denial of service. The new file I/O package is implemented so that it works regardless of the file system’s size.

Watching a directory for changes
The Watch Service api allows you to register a directory for file change notifications. An application can register for creation, deletion, or modification events. This feature can be implemented using the FileVisitor API to recursively watch an entire file tree for changes. For more information, see Watching a Directory for Changes (Java Tutorial).

Support for walking the file tree
The new FileVisitor API provides easy-to-implement support for recursively walking the file tree. This functionality allows you to examine, modify, or delete files or directories in the file system. For more information, see Walking the File Tree (Java Tutorial).

Multithreaded class loading
Prior to JDK 7, certain types of custom class loaders were prone to deadlock. In JDK 7, the locking mechanism has been modified to avoid deadlock. For more information, see Multithreaded Custom Class Loaders in Java SE 7(JDK 7 Guides).

More scalable code using fork/join framework on multiple processors
Introduced in the JDK 7 release, the fork/join framework uses the ExecutorService interface and allows you to recursively break down work to better utilize multiple processors. For more information, see Fork/Join (Java Tutorial). Also, the <Java_home>/sample/forkjoin directory in the JDK download bundle contains samples that demonstrate the fork/join framework.

Garbage-first collecter
The Garbage-first collector is a server-style garbage collector that, in JDK 7, replaces the Concurrent Mark-Sweep Collector (CMS). For more information, see Garbage-First Collector (JDK 7 Guides). 

Java HotSpot virtual machine performance enhancements
The JDK 7 release includes many Java HotSpot performance enhancements, such as tiered compilation, compressed Oops, and escape analysis. For more information, see Java HotSpot Virtual Machine Performance Enhancements (JDK 7 Guides).

Java virtual machine support for non-Java languages
The JDK 7 release introduces a new JVM instruction that simplifies the implementation of dynamically-typed programming languages on the JVM. For more information, see Java Virtual Machine Support for Non-Java Languages(JDK 7 Guides) and New JDK 7 Feature: Support for Dynamically Typed Languages in the Java Virtual Machine (OTN article).

Defining the install preferences of an application
In the JDK 7 release, an install attribute for the shortcut element has been added. You can use this optional attribute to specify the application’s preference for being considered “installed.” On Windows, this determines if the application appears in the Add or Remove Programs panel.


Posted on October 21, 2011, in java and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: