Path: blob/master/modules/java/generator/src/cpp/jni_part.cpp
16354 views
// This file is part of OpenCV project.1// It is subject to the license terms in the LICENSE file found in the top-level directory2// of this distribution and at http://opencv.org/license.html34#include "common.h"56#include "opencv2/opencv_modules.hpp"78#ifdef HAVE_OPENCV_FEATURES2D9# include "opencv2/features2d.hpp"10#endif1112#ifdef HAVE_OPENCV_VIDEO13# include "opencv2/video.hpp"14#endif1516#ifdef HAVE_OPENCV_CONTRIB17# include "opencv2/contrib.hpp"18#endif1920extern "C" {2122JNIEXPORT jint JNICALL23JNI_OnLoad(JavaVM* vm, void* )24{25JNIEnv* env;26if (vm->GetEnv((void**) &env, JNI_VERSION_1_6) != JNI_OK)27return -1;2829/* get class with (*env)->FindClass */30/* register methods with (*env)->RegisterNatives */3132return JNI_VERSION_1_6;33}3435JNIEXPORT void JNICALL36JNI_OnUnload(JavaVM*, void*)37{38//do nothing39}4041} // extern "C"424344