我实现了一个测试单元加载密钥库月神但什么是错的,当我尝试初始化“LunaTokenManager”:
public static void main(String[] args) {
try {
LunaTokenManager tokenManager = LunaTokenManager.getInstance();
} catch (Throwable t) {
t.printStackTrace();
}
}
我得到了以下信息:
java.lang.UnsatisfiedLinkError: com.chrysalisits.crypto.LunaAPI.Initialize()V
at com.chrysalisits.crypto.LunaAPI.Initialize(Native Method)
at com.chrysalisits.crypto.LunaTokenManager.<init>(LunaTokenManager.java:107)
at com.chrysalisits.crypto.LunaTokenManager.getInstance(LunaTokenManager.java:62)
at it.tasgroup.eacs.service.TestKeystoreWithLunaSA.main(TestKeystoreWithLunaSA.java:14)
LunaApi.ddl被放置在C:\ Program Files文件\卢纳萨\ JSP \ lib中Provider.jar被放在%JAVA_HOME%\ LIB \分机这两种路径在环境变量配置
两个罐“LunaJCASP-1.0.0.jar”和“LunaJCESP-1.0.0.jar”被包括作为lib放到蚀构建路径