Ask Your Question

DmitryD13's profile - activity

2014-03-06 07:00:00 -0600 received badge  Student (source)
2013-08-29 09:37:33 -0600 asked a question How to resolve "Could not find JNI" problem, building OpenCV on Raspberry Pi?

Hello,

I try to build opencv with Java on Raspberry Pi (Debian 4.6.3) and get every time an error from cmake: Could not find JNI (missing: ...). I used this documentation (http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html#sbt-project-for-java-and-scala). I have been searching for solution in the Internet for a while. The suggestions were set JAVA_HOME variable, install ant, install python, add ${JAVA_HOME}/bin variable to the PATH variable. Unfortunately, nothing has helped me yet. I tried everything, I even tried to completely remove opencv (2.4.6.1) from the Raspberry Pi, download another Version (2.4.6) and build it with cmake - nothing worked. I have two jre's on the Raspberry Pi: one (probably) preinstalled "Java-6-openjdk-armhf" and one, I installed by myself "Java Early Access" (jdk1.8.0 - speciffically for Raspbian with hardfloat). I tried to set JAVA_HOME to "/home/pi/java/jdk1.8.0" (where I installed "Java Early Access") and "/home/pi/java/jdk1.8.0/", The Problem seems to be that cmake cannot find jni.h file, which usually can be found in "JAVA_HOME/include/". I checked this file and I have it; if I type "ls $JAVA_HOME/include/" in the shell, I get files with jni.h among them. So, I am out of ideas. Please, help me, if you know how to solve my Problem.

Thanks in advance!

Dmitry

2013-08-27 03:00:28 -0600 commented answer Can't Write in PCH file crunchbang

Hi, I have the same Problem, although I got the error on 95% of "make" command. So, I ran cmake without any Problems and then by execution of make I got Problems with space. Can you tell me what should I do to complete the Installation? If the steps are the same as you wrote already, how can I detect, what files were created during "cmake" execution? Should I then run "make" command again? Thanks in advance! Dmitry