New and Noteworthy

This chapter lists high-profile features in these releases.

Enabling 3rd party 3D technologies in applets outside of the browser process (Plugin2)

The Java out-of-process applet plugin now uses the CoreAnimation rendering model in browsers which support it. This enables 3D technologies like JOGL and LWJGL to embed their content in applets while running in Plugin2, once they adopt the new JAWT API described below. 3D technologies need to use a CAOpenGLLayer subclass to embed 3D content into the applet component hierarchy.

If the browser does not support CoreAnimation rendering, CoreGraphics rendering will be used, which cannot support sub-hosting 3D technologies.

New JAWT API

New JAWT API has been introduced allowing developers to embed CALayer content into the AWT component hierarchy. Please see the /System/Library/Frameworks/JavaVM.framework/Headers/jawt_md.h header for full details.

The jawt_md.h header introduces a new Objective-C protocol (JAWT_SurfaceLayers), and a constant (JAWT_MACOSX_USE_CALAYER) to opt-into the new model. Requesting the new model is as simple as the following:

JAWT awt;
awt.version = JAWT_VERSION_1_4 | JAWT_MACOSX_USE_CALAYER;
jboolean success = JAWT_GetAWT(env, &awt);

The object obtained from the JAWT_DrawingSurfaceInfo struct has a platformInfo pointer containing an Objective-C object that implements the JAWT_SurfaceLayers protocol. By simply assigning a CALayer of your own onto the .layer property, that layer will now completely cover the AWT component.