Jump To:
Leopard Sample Code
Java support in Mac OS X is based on the Java 2, Standard Edition implementation, installed with every copy of Mac OS X and Mac OS X Server. Mac OS X Server provides more resources through JBoss and WebObjects. Developers' cross-platform J2SE applications appear as native Mac OS X applications.

A guided introduction and learning path for developers new to Java in Mac OS X.   Essential information for developers using the Mac OS X built-in Java support.  
Document Descriptions
On Off
Display

Sort by
Title
Sorted by
Topic
Sort by
Date
BlockedEventQueue (HTML) (DMG) (ZIP)
Counter-example: shows hang when Java ActionListener blocks AWTEventQueue
Design Guidelines 2006-04-13
CWCocoaComponent (HTML) (DMG) (ZIP)
Native color picker Integration for AWT/Swing applications using NSColorWell and NSColorPanel
Design Guidelines 2006-04-12
HelpHook (HTML) (DMG) (ZIP)
Simple Help Viewer integration for J2SE applications, using a native Cocoa library.
Design Guidelines 2006-04-12
JSheets (HTML) (DMG) (ZIP)
Uses AWT Native Interface (JAWT) to Display Cocoa sheet dialogs in Java
Design Guidelines 2006-07-11
MRJToolkitStubs (HTML) (DMG) (ZIP)
Deprecated - Stubs of the MRJToolkit API for building or distributing on non-Mac OS X systems.
Design Guidelines 2003-01-14
MyFirstJNIProject (HTML) (DMG) (ZIP)
A Java application that calls the Address Book framework through the JNI
Design Guidelines 2006-04-12
OSXAdapter (HTML) (DMG) (ZIP)
Hooks into the Mac OS X Application Menu with the com.apple.eawt classes via reflection.
Design Guidelines 2007-06-01
QCCocoaComponent (HTML) (DMG) (ZIP)
Displays Quartz Composer compositions inside a Swing JFrame
Design Guidelines 2006-04-12
JAWTExample (HTML) (DMG) (ZIP)
Using the new JAWT structs included with Java 1.4.1 Update 1 for Jaguar.
Graphics & Imaging 2003-10-27
SimpleCocoaJavaMovieCocoa (HTML) (DMG) (ZIP)
Deprecated - Shows how to use the NSMovieView and NSMovie Cocoa Java AppKit classes.
Graphics & Imaging 2003-01-14
SkyCreator (HTML) (DMG) (ZIP)
Demonstrates using the QuartzDebug utility with Java Applications by creating a random image of a starry sky.
Graphics & Imaging 2006-04-12
JavaEOGenerator (HTML) (DMG) (ZIP)
Java-based template generation engine similar to EOGenerator
Internet & Web 2007-11-14
JavaFrameEmbedding example (HTML) (DMG) (ZIP)
Small Cocoa application that demonstrates how to use JavaFrameEmbedding.framework
Internet & Web 2007-06-12
JavaEOGenerator (HTML) (DMG) (ZIP)
Java-based template generation engine similar to EOGenerator
Mac OS X Server 2007-11-14
BlockAnimation (HTML) (DMG) (ZIP)
A bit of java code which INCORRECTLY handles animation
Performance 2006-08-01
Bouncy (HTML) (DMG) (ZIP)
Demostrates using Shark For Java to profile Java Applications
Performance 2006-04-17
Fractal Performance (HTML) (DMG) (ZIP)
Three fractal applications that show various bottlenecks and how they can be fixed.
Performance 2006-04-17
SkyCreator (HTML) (DMG) (ZIP)
Demonstrates using the QuartzDebug utility with Java Applications by creating a random image of a starry sky.
Performance 2006-04-12
AESendandReceive (HTML) (DMG) (ZIP)
Deprecated - Sending and receiving Apple Events with JDK 1.3.1 on Mac OS X.
Porting 2003-01-14
AppleJavaExtensions (HTML) (DMG) (ZIP)
Stub classes for compiling com.apple.eawt/com.apple.eio references on non-Mac OS X platforms.
Porting 2006-10-17
JavaSplashScreen (HTML) (DMG) (ZIP)
Deprecated - Quickly display a splash screen while instantiating the 1.4.x/1.5 JVM from a Cocoa application.
Porting 2006-04-12
OSXAdapter (HTML) (DMG) (ZIP)
Hooks into the Mac OS X Application Menu with the com.apple.eawt classes via reflection.
Porting 2007-06-01
simpleJavaLauncher (HTML) (DMG) (ZIP)
How to launch 1.4.x and future JVM's from a Core Foundation tool.
Porting 2006-04-12
AddTextMovie (HTML) (DMG) (ZIP)
Adds a text track to an existing movie selected by the user.
QuickTime 2006-06-28
AddTextMovie.win (HTML) (DMG) (ZIP)
Shows how to Add a text track to a Movie.
QuickTime 2003-01-14
CreatePictFile (HTML) (DMG) (ZIP)
Creates a QTComponent from a PICT, JPEG or GIF file using a GraphicsImporter.
QuickTime 2006-05-11
CustomMedia (HTML) (DMG) (ZIP)
Demonstrates how to subclass quicktime.std.movies.media.Media to support custom media types.
QuickTime 2006-05-11
DukeMovie (HTML) (DMG) (ZIP)
Demonstrates playback of any QuickTime content within a java.awt display space using a QTComponent.
QuickTime 2006-05-11
ImageFile (HTML) (DMG) (ZIP)
Shows how to use GraphicsImporter to import and display a wide range of image file formats.
QuickTime 2006-06-28
ImageProducing (HTML) (DMG) (ZIP)
Demonstrates how to display any QuickTime drawing object using Java's ImageProducing model.
QuickTime 2006-05-05
ImportExport (HTML) (DMG) (ZIP)
Demonstrates both importing and referencing a media file and performing a movie export with customisable settings.
QuickTime 2006-05-11
KeyboardController (HTML) (DMG) (ZIP)
Shows how to customise user controlled playback of a movie using the keyboard.
QuickTime 2006-05-11
MovieCallbacks (HTML) (DMG) (ZIP)
Shows how to display a QuickTime movie within a window and add Call-backs.
QuickTime 2006-05-11
MovieTextFinder (HTML) (DMG) (ZIP)
Shows how to search for text within the text track of a QuickTime movie.
QuickTime 2006-05-11
Music (HTML) (DMG) (ZIP)
Shows how to use QuickTime's music components.
QuickTime 2006-05-11
PlayMovie (HTML) (DMG) (ZIP)
Demonstrates QuickTime content playback within a java.awt.Frame using the QTFactory to create a QTComponent.
QuickTime 2006-05-11
PlaySound (HTML) (DMG) (ZIP)
Shows how to play a sound or midi file using AWT rather than a QTComponent.
QuickTime 2006-05-11
PlayTune (HTML) (DMG) (ZIP)
Shows how to use the TunePlayer to play a Tune using the QuickTime Music Architecture.
QuickTime 2006-05-11
QTSimpleApplet (HTML) (DMG) (ZIP)
Shows how to display any QuickTime content within a java.awt.Applet.
QuickTime 2006-06-28
QTStreamingApplet (HTML) (DMG) (ZIP)
Shows how to display QuickTime streaming content within a java.awt.Applet.
QuickTime 2006-06-28
SoundMemRecord (HTML) (DMG) (ZIP)
This code shows using the SoundManager SPB calls for simple audio recording to memory.
QuickTime 2006-05-05
SoundRecord (HTML) (DMG) (ZIP)
Shows using the SequenceGrabber for simple audio recording
QuickTime 2006-05-05
TimeCallbackDemo (HTML) (DMG) (ZIP)
Demonstrates how to add and remove TimeCode tracks to a movie.
QuickTime 2006-05-11
TimeCode (HTML) (DMG) (ZIP)
Demonstrates how to add and remove TimeCode tracks to a movie.
QuickTime 2006-06-28
BlockAnimation (HTML) (DMG) (ZIP)
A bit of java code which INCORRECTLY handles animation
Tools 2006-08-01
BlockedEventQueue (HTML) (DMG) (ZIP)
Counter-example: shows hang when Java ActionListener blocks AWTEventQueue
Tools 2006-04-13
JavaEOGenerator (HTML) (DMG) (ZIP)
Java-based template generation engine similar to EOGenerator
Tools 2007-11-14
JDragNDrop (HTML) (DMG) (ZIP)
Deprecated - Demonstrates building a simple view to implement Drag-and-Drop functionality in Cocoa-Java.
Tools 2003-01-14
MyFirstJNIProject (HTML) (DMG) (ZIP)
A Java application that calls the Address Book framework through the JNI
Tools 2006-04-12
simpleJavaLauncher (HTML) (DMG) (ZIP)
How to launch 1.4.x and future JVM's from a Core Foundation tool.
Tools 2006-04-12
CWCocoaComponent (HTML) (DMG) (ZIP)
Native color picker Integration for AWT/Swing applications using NSColorWell and NSColorPanel
User Experience 2006-04-12
FunWithFileDialogs (HTML) (DMG) (ZIP)
Demo of the AWT FileChooser and Swing Aqua JFileChooser, and available Mac-specific runtime options.
User Experience 2003-04-30
HelpHook (HTML) (DMG) (ZIP)
Simple Help Viewer integration for J2SE applications, using a native Cocoa library.
User Experience 2006-04-12
JavaFrameEmbedding example (HTML) (DMG) (ZIP)
Small Cocoa application that demonstrates how to use JavaFrameEmbedding.framework
User Experience 2007-06-12
JSheets (HTML) (DMG) (ZIP)
Uses AWT Native Interface (JAWT) to Display Cocoa sheet dialogs in Java
User Experience 2006-07-11
MRJToolkitStubs (HTML) (DMG) (ZIP)
Deprecated - Stubs of the MRJToolkit API for building or distributing on non-Mac OS X systems.
User Experience 2003-01-14
MyFirstJNIProject (HTML) (DMG) (ZIP)
A Java application that calls the Address Book framework through the JNI
User Experience 2006-04-12
OSXAdapter (HTML) (DMG) (ZIP)
Hooks into the Mac OS X Application Menu with the com.apple.eawt classes via reflection.
User Experience 2007-06-01
QCCocoaComponent (HTML) (DMG) (ZIP)
Displays Quartz Composer compositions inside a Swing JFrame
User Experience 2006-04-12
SwapLAF (HTML) (DMG) (ZIP)
Deprecated - How to set the look-and-feel in your Swing application at runtime.
User Experience 2005-02-28
JavaEOGenerator (HTML) (DMG) (ZIP)
Java-based template generation engine similar to EOGenerator
WebObjects 2007-11-14