using safenet LUNA Api with eclipse (LunaTokenManager)

放肆的年华 提交于 2019-12-12 01:46:23

问题


I have implemented a test unit to load Luna keystore but something is wrong when i try to initialize the "LunaTokenManager":

public static void main(String[] args) {
  try {
    LunaTokenManager tokenManager = LunaTokenManager.getInstance();
  } catch (Throwable t) {
    t.printStackTrace();
  }
}

i got the following message:

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 is placed in C:\Program Files\LunaSA\JSP\lib Provider.jar is placed in the %JAVA_HOME%\lib\ext both path are configured in environment variables

the two jar "LunaJCASP-1.0.0.jar" and "LunaJCESP-1.0.0.jar" are included as lib into eclipse buildpath


回答1:


Two possible solutions: 1.- You're not specifying correctly the path to your libraries. 2.- Permissions issue between your process and the library directory



来源:https://stackoverflow.com/questions/27958755/using-safenet-luna-api-with-eclipse-lunatokenmanager

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!