Version: 1.2

Posted: 2006-04-12

Build Requirements: Xcode 2.0 or later

Runtime Requirements: Mac OS X 10.4 or later, Java 1.4 or later

View Source Code:

Download Sample Code (“MyFirstJNIProject.zip”, 162.8K)



Description

This sample is a modification of the standard Java Swing Application template provided by Xcode. Instead of drawing a string from the included resource bundle, it instead paints the current user's name, obtained from the Address Book framework via the JNI. Please read Building a JNI Universal Application With Xcode (http://developer.apple.com/java/jniuniversal.html) for instructions on how to build a JNI project from scratch.

This sample code has been updated to include a project that produces a universal binary. No code changes were required for it to run correctly on Intel-based Macintosh computers.

Document Revision History

Date Notes
2006-04-12Updated compiler options to generate 1.4 compatible bytecode.
2005-08-10Updated to produce a universal binary. No code changes were required. Fixed a problem with unusual Address Book names.
2005-06-01A Java application that calls the Address Book framework through the JNI