Ask Your Question
0

Where to copy opencv-249.jar & libopencv_java249.so

asked 2014-06-01 08:34:53 -0600

Alejandro Silvestri gravatar image

I'm installing opencv for use with Java in Ubuntu 14. cmake generated both

build/bin/opencv-249.jar
build/lib/libopencv_java249.so

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.

Where should I copy these files? Copying these two files alone don't work. Is there any other file o directory I need to copy with them?

Thank you very much.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-06-01 10:23:15 -0600

qbonnard gravatar image

The jar file is needed in the class path of your java project. If you're using an IDE, your project probably has a lib or libs folder where it would fit. Alternatively, your IDE probably has an "add library" menu entry somewhere, when you right click your project.

The .so file, along with the others, needs to be loaded at runtime. The standard path for that is something like /usr/lib and friends, where the system looks for dynamic libraries by default. Alternatively (and it would probably be cleaner), you can tell your IDE to run your application with the -Djava.library.path=/home/you/whereveryouhavethesofiles option passed to the Java VM.

Hope that helps...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-06-01 08:34:53 -0600

Seen: 1,527 times

Last updated: Jun 01 '14