JNI Programming on Mac OSX Intro
export JAVA_HOME=/Library/Java/Home/
JAVA EXTENSION DIRECTORY=/Library/Java/Extensions/
Add custom.jar, .zip, and .class files, as well as native JNI libraries, into an extensions directory
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers sourceFile.c
cc -dynamiclib -o libhello.jnilib sourceFile.o -framework JavaVM
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers hola.c
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers hello.c
cc -dynamiclib -o libhello.jnilib hola.o hello.o -framework JavaVM
Apple Links:
JNI Java Development
JNI Sample
JNI Sample Application
JAVA EXTENSION DIRECTORY=/Library/Java/Extensions/
Add custom.jar, .zip, and .class files, as well as native JNI libraries, into an extensions directory
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers sourceFile.c
cc -dynamiclib -o libhello.jnilib sourceFile.o -framework JavaVM
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers hola.c
cc -c -I/System/Library/Frameworks/JavaVM.framework/Headers hello.c
cc -dynamiclib -o libhello.jnilib hola.o hello.o -framework JavaVM
Apple Links:
JNI Java Development
JNI Sample
JNI Sample Application
Comments