c++ - Java program Opencv unsatisfiedlinkerror -


i have java application designed run in linux environment, developed using opencv , eclipse - ubuntu 14.04. runs fine inside eclipse , produces .jar on export. program .jar works on system opencv installed.

java -dpath.java.library="/home/me/opencv/build/lib" -jar program.jar 

the library opencv installed has files , links files in place , when ldd on libopencv_java310.so displays associated files/links aokay.

however on machine opencv not installed:

i have been able carry libs on , create links using ln command still getting

java.lang.unsatifiedlinkerror: /my/lib/libopencv_java310.so: libopencv_core.so.3.1: cannot open shared object file: no such file or directory

i did ldd on libopencv_java310.so , result libopencv_core.so.3.1 => not found - 1 of several not founds in opencv library.

the link libopencv_core.so.3.1 in directory along other correct link files , corresponding files. missing here? know need libopencv_java310.so find links don't know how.

the end point of exercise make either self contained executable, .jar or combination of lib files , .jar distributed end user in linux environment.

the answer opencv libraries need stored on installation machine in same directories production machine. in case, may have not used right directories during initial installation on production machine - storing opencv libraries in workspace.

first, created same directories on installation pc /home/me/opencv/opencv-3.1.0/build/lib , copied opencv libraries production machine directory.

second, used ldd /home/me/opencv_java310.so find libraries missing links.

third, used ln -s library.file library.link name create each link named in ldd output.

fourth, had copy on , create links libraries stored in system area /usr/lib , /usr/lib/x86_64-linux-gnu highlighted missing in ldd output opencv_java310.so

finally, able execute program java -djava.library.path="/home/me/opencv/opencv-3.1.0/build/lib" -jar program.jar

my next step automate process either shell or other utility , zip files contain data. suspect should carry library files ldd opencv_java310.so output , create links in case installation machine not have of them.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -