Ask Your Question
0

Build OpenCV for Java on Ubuntu 12.10

asked Mar 8 '13

Ayrton81 gravatar image

I try to compile OpenCV on Ubuntu 12.10 I followed the steps in the guide: http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html

jdk-7-oracle installed but:

-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

....

-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib nonfree photo legacy gpu python stitching ts videostab
-- Disabled: world
-- Disabled by dependency:-
-- Unavailable: androidcamera java ocl

....
-- Java:
-- ant: /usr/bin/ant (ver 1.8.2)
-- JNI: NO
-- Java tests: YES

But i need java generation

Preview: (hide)

3 answers

Sort by » oldest newest most voted
2

answered Mar 23 '13

jzeimen gravatar image

I have java-7-oracle installed on my ubuntu box and had the same problem. So I ran:

export JAVA_HOME=/usr/lib/jvm/java-7-oracle/

then I ran the cmake command again. And it appears to get further. I am still running into issues while making, but they me be unrelated.

Preview: (hide)
0

answered Mar 28 '13

4thguy gravatar image

Are you following the guide here?

I didn't have this problem when I was building, but I did install ant via apt-get before attempting to build.

apt-get install ant
Preview: (hide)
0

answered Jun 30 '13

Paethon gravatar image

Maybe this will help someone.

I had exactly the same problem (in my case using Debian Testing) and it was resolved by uninstalling all the open versions of Java and installing the proprietary one from oracle.

Preview: (hide)

Question Tools

Stats

Asked: Mar 8 '13

Seen: 6,715 times

Last updated: Jun 30 '13