A question about java opencv jni [closed]
We know that we are provided a java interface like Java249.jar and a dynamic link file like dll files in Windows .I think that it doesn't matter whether i have configured the c++ Opencv in my OS. Because the java program calls the dll not the primal c++ opencv. So i don't need to install Opencv c++ if i just want to use it in java. I only need two files(.jar and .dll ).It's that right? Thanks!
unfortunately, to link the native dll against the opencv code, you need to have opencv with c++ configured.
can you tell me the reason? i know that the c++ environment is needed.but why must i install opencv with c++?is the dll for java will call the dlls for c++?
if you have jni c++ code, and want to compile that, you need a compiler, right ?
if that code is dependant on opencv, you will have to link it against opencv libs, right ?
maybe you were asking: "do i have to rebuild opencv from src for this" ? - not if you have the same compiler, your opencv libs were build with.
OK,I got it. of course a c++ cmpiler is needed.You said that the code is dependant on opencv and i just wanted this fact.You means that the dll for java is just like an interface,not the all code.it have to call other dlls. I have thought that all needed native code is writen in this only dll. Because i know some small projects i can do like this. Have i understood what you said? Thanks a lot
yes, i think, you got the connection now.
btw, setting up a project in e.g. vs is almost the same for jni as any other opencv demo (like the displayimage.cpp) - the only difference is, you're building a dll, not an exe.
ok, it's clear now