user3425268
user3425268

Reputation: 31

opencv 2.4.9 can't find .jar file for my eclipse java project

So I tried to install openCV in Mac OS X and use it in my project, and I find some ways to do it, but when I install it, and use the command line trying to come up with the opencv2.4.9.jar file, but I can't find it anywhere.

This is what I did

$ cd opencv-2.4.9
$ mkdir build
$ cd build/
$ cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/g++ -D CMAKE_C_COMPILER=/usr/bin/gcc -D WITH_CUDA=ON .. 
$ make -j8 
$ make install

Based on the tutorial, this should create a jar file in the opencv-2.4.9/build/bin, but I'd tried so many times, still can't find it.

Can someone tell me what is the problem? Thanks

Upvotes: 2

Views: 2999

Answers (2)

themadmax
themadmax

Reputation: 2404

Check return cmake command:

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

and

--   Java:
--     ant:                         NO
--     JNI:                         /usr/lib/jvm/java-7-openjdk-amd64/include /usr/lib/jvm/java-7-openjdk-amd64/include /usr/lib/jvm/java-7-openjdk-amd64/include
--     Java tests:                  NO

Check you JAVA_HOME :

$ ls $JAVA_HOME
ASSEMBLY_EXCEPTION  bin   include  lib  src.zip
THIRD_PARTY_README  docs  jre      man

And Finally check if you have ant pacakge

$ sudo apt-get install ant

Upvotes: 1

Alejandro Silvestri
Alejandro Silvestri

Reputation: 3774

may be your're lacking the JAVA_HOME environmental variable, which have to contain your JDK path. It happened in Ubuntu: http://answers.opencv.org/question/34221/cant-find-opencv-249jar-file/?answer=34442#post-id-34442

Upvotes: 1

Related Questions