





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






dlopen
C Function Signature-Constructing the function nameCMSC 212 – S05 (lect 26)
-^ Java_ + Full Classname + _ + Method NameJNIEXPORT void JNICALL Java_HelloWorld_displayHelloWorld (JNIEnv *, jobject);
#include <jni.h>#include "HelloWorld.h"#include <stdio.h>JNIEXPORT void JNICALLJava_HelloWorld_displayHelloWorld
(JNIEnv *env, jobject obj) { printf("Hello world!\n");return;}
class HelloWorld {public nativevoid displayHelloWorld();static {System.loadLibrary("hello");} public static void main(String[] args){ newHelloWorld().displayHelloWorld();} }
sum += body[i];} (*env)->ReleaseFloatArrayElements(env, arr, body, 0);return sum;}