I am trying to do a project combining opencv with java. I am trying to build opencv using cmake. But every time I am trying to do so following error comes up. command I used is,
cmake -DBUILD_SHARED_LIBS=OFF ..
The error message received is:
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY
JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
I have tried every thing by searching the threads here, but couldn't find the solution for this.
Things I have tried are:
- Setting the environmental variables for java using
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
- editing the FindJNI.cmake file under cmake installed directory
I am using cmake 3.0. and linux mint as the OS.