Build OpenCV Java for Linux, MacOS and Windows
Hey,
Is it possible to build OpenCV Java for Linux, MacOS and Windows and optain a single jar file containing libraries for each OS ?
I was using a Maven repository but its jar does not contain the tracking module, so I'd like to make my own.
Thank you!
that's what you get, anyway. the jar file contains only shallow wrappers around the opencv c++ code (in so's/dll's) , which has to get conpiled per architecture / toolchain.
please try at least for your os, using opencv_contrib.
make sure you have some version of python, the java ant tool and some current jdk around.
opencv does not maintain anything there.
Thanks, It's compiling on a MacOS, but can this jar be used in a Windows and a Linux environment ?
no, the jar file can't be used without a platform specific c++ binary, an so/dll.
so you need to recompile opencv. for each platform..
I see, so is it possible to compile it on each platform,obtain 3 jars, and make a unique jar with every lib? As the one in the Maven repository?
Thank you in advance
you don't get it. opencv is a c++ library. the jar file containing the java wrappers around it is irrelevant.
Sorry to insist, but what do you recomend me to do considering that the java opencv code will be used/implemented in different OSs.
Compile OpenCV (with contrib) on each OS in order to have the necessary c++ libs (so/dll) and one of the jars ?
yes, exactly. it will also autogenerate the java code / jar file.