我尝试构建openCV for Java以在BeagleBoneBlack上运行它。我的问题是,当我交叉编译它为arm时,它仍然给我一个错误消息,说它在ARM位平台上加载IA 32位.so。我已尝试使用以下指南: http://www.ridgesolutions.ie/index.php/2013/05/24/building-cross-compiling-opencv-for-linux-arm/ 我遵循了这个指南: http://docs.opencv.org/doc/tutorials/introduction/desktop_java/java_dev_intro.html
我确实将生成的jar包含到Java项目中,并将openCV添加为本机库。另外,我将.so放入了baglebone black的jre / arm文件夹......
以下是完整的错误消息:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-8-oracle/jre/lib/arm/libopencv_java300.so: /usr/lib/jvm/java-8-oracle/jre/lib/arm/libopencv_java300.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1843)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1119)
at open.main(open.java:9)
... 5 more
非常感谢您的帮助!