2018-04-06 08:46:13 -0600 | received badge | ● Student (source) |
2016-01-16 18:36:47 -0600 | answered a question | Java program Opencv unsatisfiedlinkerror The answer is the Opencv libraries need to be stored on the installation machine in exactly the same directories as the production machine. In my case, I may have not used the right directories during my initial installation on the production machine - storing the opencv libraries in my workspace. First, I created the same directories on the installation PC /home/me/OpenCV/opencv-3.1.0/build/lib and copied all the opencv libraries from the production machine into that directory. Second, I used ldd /home/me/opencv_java310.so to find the libraries with missing links. Third, I used ln -s library.file library.link name to create each link as named in the ldd output. Fourth, I had to copy over and create links for some libraries stored in the system area /usr/lib and /usr/lib/x86_64-linux-gnu that were also highlighted as missing in the ldd output from opencv_java310.so Finally, I was able to execute the program java -Djava.library.path="/home/me/OpenCv/opencv-3.1.0/build/lib" -jar program.jar My next step will be to automate this process with either a shell or some other utility and zip files to contain all the data. I suspect that I should carry ALL the library files from the ldd opencv_java310.so output and create the links just in case the installation machine does not have any of them. |
2016-01-14 10:52:30 -0600 | asked a question | Java program Opencv unsatisfiedlinkerror I have a java application designed to run in the Linux environment, developed using Opencv and Eclipse - Ubuntu 14.04. It runs fine inside Eclipse and produces a .jar on export. The program .jar works perfectly on the system where the opencv is installed. java -Dpath.java.library="/home/me" -jar program.jar The library where opencv is installed has all the so files and links to so files in place and when I do a ldd on the libopencv_java310.so it displays all the associated so files/links are aokay. However on the machine where opencv is not installed: I have been able to carry the libs over and create all the links using the ln command however I am 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 an ldd on libopencv_java310.so and the result is libopencv_core.so.3.1 => not found - one of several not founds in the opencv library. The link libopencv_core.so.3.1 is in the directory along with all the other correct link files and their corresponding so files. What am I missing here? I know I need get the libopencv_java310.so to find the links but I don't know how. The end point of this exercise is to make either a self contained executable, .jar or a combination of lib files and .jar to be distributed to end user in the linux environment. |
2016-01-13 14:25:01 -0600 | received badge | ● Editor (source) |
2016-01-13 09:15:54 -0600 | answered a question | Distribute Opencv java project? The answer is the Opencv libraries need to be stored on the installation machine in exactly the same directories as the production machine. In my case, I may have not used the right directories during my initial installation on the production machine - storing the opencv libraries in my workspace. First, I created the same directories on the installation PC /home/me/OpenCV/opencv-3.1.0/build/lib and copied all the opencv libraries from the production machine into that directory. Second, I used ldd /home/me/opencv_java310.so to find the libraries with missing links. Third, I used ln -s library.file library.link name to create each link as named in the ldd output. Fourth, I had to copy over and create links for some libraries stored in the system area /usr/lib and /usr/lib/x86_64-linux-gnu that were also highlighted as missing in the ldd output from opencv_java310.so Finally, I was able to execute the program java -Djava.library.path="/home/me/OpenCv/opencv-3.1.0/build/lib" -jar program.jar My next step will be to automate this process with either a shell or some other utility and zip files to contain all the data. I suspect that I should carry ALL the library files from the ldd opencv_java310.so output and create the links just in case the installation machine does not have any of them. |
2016-01-13 08:58:07 -0600 | received badge | ● Enthusiast |
2016-01-10 18:30:10 -0600 | commented answer | Distribute Opencv java project? I was able to run the .jar file successfully on the machine where opencv is installed using the -Djava.library.path="/my/path" command linking the opencv_java310.so to the .jar. However, when I run on a different machine where opencv is not installed I have encounted: "java.lang.unstatisfiedlinkerror: libopencv_java310.so: libopencv_core.so.3.1 cannot open shared object file.: No such file or directory" I have brought over the opencv_core.so.3.1.0 file over and built a link file libopencv_core.so.3.1 that it references the libopencv_ core.so.3.1.0 but no success. Same error. |
2016-01-06 11:37:03 -0600 | received badge | ● Autobiographer |
2016-01-06 11:36:24 -0600 | asked a question | Distribute Opencv java project? Forgive the newbie question - Eclipse 3.8 Ubuntu 14.04 - java project runs under Eclipse a-ok. I would like to export to production and distribute .jar to other linux users. However, what I am reading so far indicates the users must install Opencv on their own systems before they can use my program. Is that correct? If not - what steps can I take to make this as painless as possible on the users who are unlikely to be very computer literate. * please see my update below and post assistance if you can |