https://zhuanlan.zhihu.com/p/37686736 参考这个,在maven打包的时候将dll和so文件打进jar中,然后讲加载文件的代码改一下: static { if (isWindows()) { String path = Finance.class.getResource("").getPath().replaceAll("%20", " ").replaceFirst("/", "").replace("/", "\\\\"); //加载顺序不要变 System.load(path.concat("libeay32.dll")); System.load(path.concat("libprotobuf.dll")); System.load(path.concat("ssleay32.dll")); System.load(path.concat("libcurl.dll")); System.load(path.concat("WeWorkFinanceSdk.dll")); } else { String path = Finance.class.getResource("").getPath(); System.load(path.concat("libWeWorkFinanceSdk_Java.so")); } } public static boolean isWindows() { String osName = System.getProperties().getProperty("os.name"); System.out.println("current system is " + osName); return osName.toUpperCase().indexOf("WINDOWS") != -1; }
spring boot项目如何整合企业微信会话内容存档提供的dll文件在windows 环境下 整合企业微信会话存档提供的sdk 时出现 java.lang.UnsatisfiedLinkError: WeWorkFinanceSdk.dll: Can't find dependent libraries 异常 请问应该如何放置这个dll文件 以供程序读取呢
2020-04-09