环境: ubuntu 16.04, Eclipse Java EE IDE for Web Developers.(Version: Neon.2 Release (4.6.2))
架包 objectdetection_lib.jar 中 ObjectDetectionImplement.class 中有调用 System.loadLibrary
static{
System.loadLibrary("objectdetection");
}
1. 运行时出现以下错误:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
sun.arch.data.model = 64
Exception in thread "main" java.lang.UnsatisfiedLinkError: no objectdetection in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at objectdetection.ObjectDetectionImplement.<clinit>(ObjectDetectionImplement.java:35)
at objectdetection_demo.ObjectDetection.main(ObjectDetection.java:23)
此错误需要 将 libobjectdetection.so 所在路径 添加至