0

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:

  1. Setting the environmental variables for java using export JAVA_HOME=/usr/lib/jvm/java-8-oracle
  2. editing the FindJNI.cmake file under cmake installed directory

I am using cmake 3.0. and linux mint as the OS.

  • Possible duplicate of [How to resolve "Could not find JNI", building OpenCV on Raspberry Pi?](https://stackoverflow.com/questions/18529800/how-to-resolve-could-not-find-jni-building-opencv-on-raspberry-pi) – Oleg Aug 09 '17 at 18:06
  • already tried every thing in that post. still couldn't solve the problem – chamith mawela Aug 09 '17 at 18:08

0 Answers0