1.JAVA的JNI部分
调用JNI的基类
实现这个基类
调用JNI的基类
- package lveyo.bcndyl.jni.opencv;
- public class JNIBase {
- public JNIBase(){}
- public JNIBase(String libraryName){
- loadLibrary(libraryName);
- }
- private static void loadLibrary(String libraryName){
- System.loadLibrary(libraryName);
- }
- }
实现这个基类
- package lveyo.bcndyl.jni.opencv;
- public class JNIOpencv extends JNIBase{
- public JNIOpencv (String libraryName){
- super(libraryName);
- }