Ask Your Question

Can't find opencv-249.jar file

asked 2014-05-28 10:13:46 -0500

Alejandro Silvestri gravatar image

updated 2014-05-28 10:36:50 -0500

berak gravatar image

Recently downloaded and installed OpenCV 2.4.9 on Ubuntu 14 (decompress, cmake, make, install). Now I'm following "Using OpenCV Java with Eclipse" tutorial

It refers to C:\OpenCV-2.4.6\build\java\opencv-246.jar (of course, this example is about opencv version 2.4.6 on Windows), but I can't find the jar file in the drive, not even the "build" subdir in the uncompressed directory.

Any hint? Thank you

edit retag flag offensive close merge delete



check the cmake output again. it should look similar to this(sorry, windows again):

    ant:                         E:/app/bin/ant.bat (ver 1.9.1)
    JNI:                         D:/Programme/Java/jdk1.6.0_16/include D:/Programme/Java/jdk1.6.0_16/include/win32 D:/Programme/Java/jdk1.6.0_16/include
    Java tests:                  NO

you will need ant installed before

berak gravatar imageberak ( 2014-05-28 10:33:48 -0500 )edit

Thanks berak, you gave me the starting point to investigate. It turned out that it's needed to have JAVA_HOME environmental variable set (and pointing to jdk home directory) before running cmake. After "export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64" (in my case, of course), cmake generated both: build/bin/opencv-249.jar build/lib/

My only remaining issue is that "make install" didn't copy these files to any place (like usr/local/lib or else), so I can't remove the original opencv directory.

I think I'll post a new question about it. Thank you very much.

Alejandro Silvestri gravatar imageAlejandro Silvestri ( 2014-06-01 08:24:23 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-01 08:28:49 -0500

Alejandro Silvestri gravatar image

It's needed to have JAVA_HOME environmental variable set (and pointing to jdk home directory) before running cmake. After

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

(path may differ in your system), cmake generated both:


Note: 'build'is the temp file where I run cmake and make. make install didn't copy these files to anywhere.

edit flag offensive delete link more


Hi, i tried what u said but the results are the same..(i.e., no jar file) i have few doubts in mind 1) should ant be installed in the system? 2) what are the options to be used while using cmake command? 3) I am installing opencv-3.0.0 .. can version be a problem?

If u can help in any way...Thanks!!

Sbmsgl gravatar imageSbmsgl ( 2014-10-10 00:54:01 -0500 )edit

I found out "ant" should be installed to get .jar and .so files in the respective directories ...

Sbmsgl gravatar imageSbmsgl ( 2014-10-10 02:42:55 -0500 )edit

also files(both opencv-300.jar and are copied to /usr/local/share/OpenCv/java(in my case) directory during make install.

Sbmsgl gravatar imageSbmsgl ( 2014-10-10 02:52:23 -0500 )edit

Question Tools


Asked: 2014-05-28 10:13:46 -0500

Seen: 5,964 times

Last updated: Jun 01 '14