New and Noteworthy

This chapter lists high-profile features in these releases.

Java Deprecation

As of the release of Java for OS X v10.6 Update 3, the Java runtime ported by Apple and that ships with OS X is deprecated. Developers should not rely on the Apple-supplied Java runtime being present in future versions of OS X.

The Java runtime shipping in OS X v10.6 Snow Leopard, and OS X v10.5 Leopard, will continue to be supported and maintained through the standard support cycles of those products.

Third Party JVM Support and Locations

Java Preferences now shows all discovered JVMs in a single list in the General tab. This list shows the name, vendor, architecture, and full version of each JVM (8146434). It also coalesces multiple versions of the same major platform version from the same vendor and architecture into the same line. Clicking on the version at the end of the line shows a popup menu which chooses between these multiple versions.

Java SE 6 Locations

The location of the Java SE 6 runtime home has changed to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home. JDK bundles provided via the Developer package, developer previews, and 3rd party JVMs should be installed in /Library/Java/JavaVirtualMachines or ~/Library/Java/JavaVirtualMachines. Developer previews of Java can now be installed and uninstalled without affecting the system JVM(s).

Java IDEs

In testing, some Java IDEs have shown problems navigating into the new JDK bundle structure, and persisting the location of the new JDK bundles. Some IDEs may have to change how they prompt users to locate a JVM on OS X, and should ideally present a list of JVMs generated from /usr/libexec/java_home --xml, which outputs each discovered JVM, and orders them according to the user's order in Java Preferences.

Developer Package

The Java Developer package now supersedes the Java Documentation package (3672275). The developer package contains a copy of the Java SE 6 JDK bundle with all JavaDoc and source jars included inside of it. The Java Developer package also contains documentation for the Java tools in /usr/share/java, such as Ant, Maven, JUnit, and Derby. If you do JNI development, you must install the Java Developer package, since it contains updated headers for the native JavaVM.framework and its sub-frameworks (8421130). The Java Developer package is available from

Redesigned eAWT

The class has undergone a significant redesign of basic Mac event handling (4083709, 4623624, 4714211, 5445495, et al.). Most of the operations handled by ApplicationListeners are now processed by a single delegate handler:

You can also register multiple listeners for each of these listeners with the addAppEventListener(AppEventListener) method:

The JavaDoc for all of the Apple Java extensions (including the eAWT) is present in the appledocs.jar file of the Developer .jdk bundle in /Library/Java/JavaVirtualMachines.

Sudden Termination

Java applications on OS X v10.6 can now opt-in to being suddenly terminated by the OS to speed log-out and shut down. Apps can raise and lower their sudden termination count with the enableSuddenTermination() and disableSuddenTermination() methods on the class. More information on Sudden Termination is available in NSProcessInfo Class Reference. (5756768)

Default Quit Action

Applications can now request that the eAWT send WindowClosing events to all open windows instead of calling System.exit(0) when the user choose Quit from the application menu. By setting the apple.eawt.quitStrategy system property to CLOSE_ALL_WINDOWS, the eAWT will send a close event to every window in back-to-front order (3198576).

Improved Garbage Collection vs. Virtual Memory Paging Behavior

In Java SE 6 on OS X v10.6, a new optimization has been enabled that prevents garbage-only heap pages from paging out to disk when the system is under memory pressure. It should improve overall system responsiveness when switching between apps, because Java will not be spending time paging heap pages with only garbage to disk (2830171).