使用spring-boot-devtools导致在Eclipse下的UnsatisfiedLinkError问题

在Eclipse中运行报UnsatisfiedLinkError错的原因:使用了spring-boot-devtools包,与java的System.loadLibrary冲突

解决方法自然就是在pom中去掉对spring-boot-devtools包的依赖

========================================================================

原文地址:https://stackoverflow.com/questions/43477908/java-spring-boot-application-with-opencv-unsatisfiedlinkerror-under-eclipse-if

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值