mirror of
https://github.com/opencv/opencv.git
synced 2025-01-16 04:50:53 +08:00
24 lines
425 B
C++
24 lines
425 B
C++
|
#include <jni.h>
|
||
|
|
||
|
extern "C" {
|
||
|
|
||
|
JNIEXPORT jint JNICALL
|
||
|
JNI_OnLoad(JavaVM* vm, void* reserved)
|
||
|
{
|
||
|
JNIEnv* env;
|
||
|
if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)
|
||
|
return -1;
|
||
|
|
||
|
/* get class with (*env)->FindClass */
|
||
|
/* register methods with (*env)->RegisterNatives */
|
||
|
|
||
|
return JNI_VERSION_1_6;
|
||
|
}
|
||
|
|
||
|
JNIEXPORT void JNICALL
|
||
|
JNI_OnUnload(JavaVM *vm, void *reserved)
|
||
|
{
|
||
|
//do nothing
|
||
|
}
|
||
|
|
||
|
} // extern "C"
|