你可以使用System.loadLibrary(String libname)方法来加载本地库,该方法会自动处理库的加载和卸载,以确保不会出现Native Library already loaded in another classloader错误。这里是修改后的代码:

static {
    System.loadLibrary("msvcr110");
    System.loadLibrary("libeay32");
    System.loadLibrary("ssleay32");
    System.loadLibrary("sdfapi_x64");
    System.loadLibrary("syySdfHsm");
}

请确保你的本地库文件(.dll文件)位于正确的路径下,然后使用上述代码加载这些库。


原文地址: https://www.cveoy.top/t/topic/qqG1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录