Ask Your Question
0

Build OpenCV for Java on Ubuntu 12.10

asked 2013-03-08 07:42:35 -0600

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

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2013-03-22 19:25:15 -0600

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.

edit flag offensive delete link more
0

answered 2013-03-28 10:05:19 -0600

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
edit flag offensive delete link more
0

answered 2013-06-30 17:51:17 -0600

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-08 07:42:35 -0600

Seen: 6,697 times

Last updated: Jun 30 '13