Ask Your Question
1

Can't build opencv2.4.4 with java support [on Ubuntu 12.04]

asked 2013-03-09 11:55:02 -0600

FDamn gravatar image

Hello, Im trying to build OpenCV-2.4.4 to make java aplications on linux (ubuntu).

I follow this tutorial but CMake never find java. When I type in console (as root)

cmake -DBUILD_SHARED_LIBS=OFF ..

I get this:

image descriptionhttp://answers.opencv.org/upfiles/13628489826011917.png

As you can see, java is not included in the list of modules to be build.

I have checked java in my system (with update-alternatives --config java), and it seems to be ok (I have installed both, jre and jdk):

image description

Any help will be more than wellcome. And please, excuse my english. Thanks!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2013-03-10 00:36:02 -0600

Daniil Osokin gravatar image

Hi! Cmake says, that java module unavailable, so you have some of Java-related tools not installed (may be you haven't Apache Ant). Please, check "Download" section of java tutorial. Also, you should set JAVA_HOME environment variable as described here.

edit flag offensive delete link more

Comments

I'm still having the same problem, although I have Oracle JDK 6, Apache Ant 1.8, and Python 2.6. Of course, I made sure that cmake actually SEES them all and recognizes them (I exported the appropriate variables) I'm running 32-bit version of Ubuntu 10.04

Are there any other dependencies I should worry about?

basheer gravatar imagebasheer ( 2013-03-30 02:39:50 -0600 )edit

Please provide the complete CMake output to localize the problem.

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-04-01 03:31:48 -0600 )edit

@Andrey I solved that specific problem by fixing a bug that I reported here.

basheer gravatar imagebasheer ( 2013-04-01 15:11:53 -0600 )edit

also, for the record, I found that using Oracle JDK 7 is better than 6 (less errors to deal with)...

basheer gravatar imagebasheer ( 2013-04-01 15:15:55 -0600 )edit
1

I commented your ticket, the proposed solution isn't correct.

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-04-03 08:46:10 -0600 )edit
1

answered 2013-03-09 12:06:25 -0600

Guanta gravatar image

You can examine if the java-module is actually enabled and if the correct paths are set if you use 'ccmake' instead of 'cmake' in your build-folder (of opencv). Btw: here you can also select other options like the usage of TBB and SSSE4, etc.

edit flag offensive delete link more

Comments

nevermind my old comment. I was confusing this with another question...

basheer gravatar imagebasheer ( 2013-04-04 00:02:51 -0600 )edit

Question Tools

Stats

Asked: 2013-03-09 11:55:02 -0600

Seen: 6,081 times

Last updated: Mar 10 '13