https://work.weixin.qq.com/api/doc/90000/90135/91774#%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B
(1)执行命令,java -jar ./WeWorkFinanceSdk.jar 1 0 100 -Djava.library.path=/home/wechat/solib/
(2)java.library.path的有效目录是/home/wechat/solib/:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
(3)libWeWorkFinanceSdk_Java.so放在/home/wechat/solib/目录下
(4)在windods环境下初始化sdk能够成功,但是切换到linux环境的时候,始终报错,错误信息如下
Exception in thread "main" java.lang.UnsatisfiedLinkError: no WeWorkFinanceSdk in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at com.tencent.wework.Finance.<clinit>(Finance.java:126)
at com.company.Main.main(Main.java:45)
遇到同样问题,解决方案如下
// 加载类库 使用loadLibrary加载的时候,System.loadLibrary("WeWorkFinanceSdk"); Windows系统加载库的时候,会找WeWorkFinanceSdk.dll Linux系统加载库的时候,会找libWeWorkFinanceSdk.so 所以libWeWorkFinanceSdk_Java.so,改成libWeWorkFinanceSdk.so
这样写的时候报:java.lang.UnsatisfiedLinkError: C:\openjdk\bin\WeWorkFinanceSdk.dll: Can‘t find dependent libraries这个错
Exception in thread "main" java.lang.UnsatisfiedLinkError: no WeWorkFinanceSdk in java.library.path
楼主解决没
遇到了一样的问题,请问楼主解决了吗?
遇到了一样的问题,请问楼主解决了吗