在Eclipse中运行报UnsatisfiedLinkError错的原因:使用了spring-boot-devtools包,与java的System.loadLibrary冲突
解决方法自然就是在pom中去掉对spring-boot-devtools包的依赖
========================================================================
I have made a Spring boot application (1.4.0) with OpenCv dependency also. I installed and configured OpenCv on my mac, I did must compile it for mac... I made a link in java_home/jre/lib/ to the external library /usr/local/share/OpenCV/java/libopencv_java320.dylib .
If I run the jar from terminal (not under eclipse) all it's all right, but if I run the application under Eclipse it can't find the native library and I get a java.lang.UnsatisfiedLinkError: org.opencv.imgcodecs.Imgcodecs.imread_1(Ljava/lang/String;)J when I make Mat matScreenshot = Imgcodecs.imread(absolutePathScreenshot);
I found an usefull post https://github.com/spring-projects/spring-boot/issues/3315 that take me to the right way: in my pom.xml I included the dependency spring-boot-devtools that conflict with the System.loadLibrary ...
When I turn off the dependency, the application run correctly under Eclipse too.
I found this solution after days of research, I put this 'answer' here hoping it will be helpfull