views:

523

answers:

3

Just wondering if it is possible to access the Mac OS X Address Book API's from pure Java 6 code? I want to keep this completely platform independent as my program is built for Windows & Linux also (open source & free: http://jsmsirl.sourceforge.net/).

Any help is much appreciated!

+2  A: 

There is no way, as far as I know. Apple has a guide for accessing the address book through JNI though, which is available here. The sample code for MyFirstJNIProject is available here.

The guide also shows how to check the underlying operating system and only call the JNI code when running on Mac OS X platforms.

notnoop
A: 

sqlite3 AddressBook-v22.abcddb and You have access to all data from Address Book, now some SQL statements and You're done:

select * from ZABCDCONTACTINDEX;

for example

HF

dmilith
What?? **Mac** Address book is not just an Address Book data application.
Ron Klein
A: 

I figured out a way of doing it by using the Rococoa library.

I've described how it's done here.

Fin