Is it possible to access the Mac Address book API from pure Java?
-
21-08-2019 - |
Question
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!
Solution
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.
OTHER TIPS
I figured out a way of doing it by using the Rococoa library.
I've described how it's done here.
I know previous post (the one downvoted to -1 about sqlite3) isn't related to the question beeing asked (and also isn't this one), however it was helpful for me. I'm working in a program where I'm given a .abbu file and I need to import the data to my product AddressBook and that post was my "salvation".
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