简体   繁体   English

java Opencv unsatisfiedLinkError,本地库被加载

[英]java Opencv unsatisfiedLinkError, native Library is loaded

I am trying to run some program on opencv, but I am getting this error:我正在尝试在 opencv 上运行一些程序,但出现此错误:

Exception in thread "main" java.lang.UnsatisfiedLinkError:  
org.opencv.objdetect.CascadeClassifier.CascadeClassifier_0(Ljava/lang/String;)J

I have already loaded the library, libopencv_java310.so by using this code:我已经使用以下代码加载了库 libopencv_java310.so:

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);  

I have also added the path to the native library.我还添加了本地库的路径。

I have searched a lot on the internet, but the only reason this error comes, is due to native library is not loaded.我在互联网上搜索了很多,但出现此错误的唯一原因是未加载本机库。 What could be the other reason of getting this error.出现此错误的其他原因可能是什么。

Can anyone help....!谁能帮帮忙....! Any help will be appreciated.任何帮助将不胜感激。

you might move your System.loadLibrary(Core.NATIVE_LIBRARY_NAME);你可能会移动你的System.loadLibrary(Core.NATIVE_LIBRARY_NAME); to a static block so the dll gets loaded before any instruction of opencv .到静态块,以便在 opencv 的任何指令之前加载 dll。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.UnsatisfiedLinkError:Native Library sqljdbc_auth.dll已经加载到另一个类加载器中 - java.lang.UnsatisfiedLinkError: Native Library sqljdbc_auth.dll already loaded in another classloader java.lang.UnsatisfiedLinkError:本机库:{…} .dll已在另一个类加载器中加载 - java.lang.UnsatisfiedLinkError: Native Library: {…}.dll already loaded in another class loader 出现错误:java.lang.UnsatisfiedLinkError:本机库C:\\ opencv \\ build \\ java \\ x64 \\ opencv_java300.dll - getting error : java.lang.UnsatisfiedLinkError: Native Library C:\opencv\build\java\x64\opencv_java300.dll java.lang.UnsatisfiedLinkError:本地库{____。dll}已经加载到另一个类加载器中 - java.lang.UnsatisfiedLinkError: Native Library {____.dll} already loaded in another classloader java.lang.UnsatisfiedLinkError: Native Library XXX.so 已经加载到另一个类加载器中 - java.lang.UnsatisfiedLinkError: Native Library XXX.so already loaded in another classloader 在Tomcat8中重新加载应用程序期间,java.lang.UnsatisfiedLinkError本机库已加载到另一个类加载器中 - java.lang.UnsatisfiedLinkError Native Library already loaded in another classloader during app reload in Tomcat8 未随Maven加载的OpenCV本机库 - OpenCV native library not loaded with Maven Android java.lang.UnsatisfiedLinkError与本机库 - Android java.lang.UnsatisfiedLinkError with native library UnsatisfiedLinkError:本机库sunmscapi.dll已在另一个类加载器中加载 - UnsatisfiedLinkError: Native Library sunmscapi.dll already loaded in another classloader UnsatisfiedLinkError:java.library.path 中没有 opencv_java249 - UnsatisfiedLinkError: no opencv_java249 in java.library.path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM