Talk:Java Native Interface
Appearance
In a similar example, the MacOS X command line for creating the shared library was this:
gcc -o libNativeSideBridge.jnilib -dynamiclib -I/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers/ getpriority.c NativeSideBridge.c
where the loadLibrary call was System.loadLibrary("NativeSideBridge"
), getpriority.c
was native C, and NativeSideBridge.c
implemented JavaSide.h
(generated by javah
).