I have ported a Mac OS 9 shared library to Mac OS X using Codewarrior 8 and
the Carbon methodology. What are the prerequisites and steps for wrapping
this library under Java Native Interface since the caller application is
written in Java and Java itself cannot call methods directly from a native
shared library? Are there any previous attempts, expreiences? Any obstacles?
Byron
Greg - 26 Sep 2005 00:15 GMT
The JNI library must be Mach-O. It must be a dylib named
"lib<yourlibname>.jnilib". I'm pretty sure there is sample code for JNI
libs on the Apple Developer Site. You say that your native is Carbon,
if it does any GUI interaction, things will be complicated with JDK 1.4
& JDK 1.5 on Mac OS X, as they use Cocoa.
In addition, you'll find a wealth of information in Apple's java-dev
mailing list and its archive.
-Greg