When I do the cmake command the "To be build" section doesn't appear java, what could be the reason for that? I've java installed in my machinewhic
cmake -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=OFF -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-master/modules/ ..
To be built:
core flann imgproc ml photo reg surface_matching video dnn fuzzy
imgcodecs shape videoio highgui objdetect plot superres ts xobjdetect
xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency
text calib3d ccalib datasets rgbd stereo structured_light tracking
videostab xfeatures2d ximgproc aruco optflow stitching python2
Java version
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)
The environment variable is also rightfully set:
echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle/jre/bin/java
references: http://docs.opencv.org/3.1.0/d7/d9f/tutorial_linux_install.html#gsc.tab=0
# --- Java Support ---section of the top-level CMakeLists.txt and add a couple of messages to see if the dependency detection finds what's required.JAVA_HOMEvariable, where does it point? Seems like the java binary to me. What if you shorten it to only/usr/lib/jvm/java-8-oracle/? Looking at the CMake moduleFindJNI.cmake, that seems to be the issue.