It took more than n hours to finally compile the OPENCV, generated so dynamic libraries and jar files, and deployed the project with Tomcat. It's really hard for me to be a rookie.
Previously installed automatic production Opencv_java2413.dll and Opencv_java.jar in Windows with Opencv2.4.13.exe. But the project is going to be deployed on Linux. Results on the internet can not find the corresponding opencv_java.so to download. The results can only be compiled by themselves and now download the Ubuntu system installed in the virtual machine. And in the inside of the development environment needed to build good.
Reference: http://developer.51cto.com/art/201503/469692.htm, etc.
The system is ubuntu14.0.4. JDK1.7. opencv2.4.13. Tomcat7.
Compile the OpenCV according to the reference material. The result is that the Build/java folder is not referenced in the OpenCV's Build folder. Only the jar that corresponds to the production is found in the Build/bin.
But always feel that you compile without problems. Spent half a day to finally find the Java file under the/usr/local/share/opencv/. There are libopencv_java2413.so and Opencv-java2413.jar.
After that, we deployed Tomcat. In the Windows system, the Opencv_java2413.dll will be put into the Java Bin directory. But in Linux the libopencv_java2413.so into the Java Bin directory does not work, always reported Java.lang.UnsatisfiedLinkError:no opencv_java2413 I think I compiled this so library is not correct. I also installed eclipse in Linux, introduced libopencv_java2413.so and Opencv-2413.jar, it is possible to run a project. The question has been made clear that he is small white.
Find further information: http://blog.csdn.net/niuxinlong/article/details/4176612
Finally, execute the export ld_library_path= $LD _library_path:/usr/local/share/opencv/java/before starting Tomcat. Finally the project is ready.
After the completion of the relief. Think about it later if you know more, or have a teacher pointing it out. In fact, the whole process will be very simple.
Compiled opencv_java.so and Opencv-java2413.jar
Linux+java+opencv2.4.13+tomcat deployment