问题遇到的现象和发生背景
在用java idea 调用使用超级狗的Licensing API时总是提示SuperDog API dynamic library not found
问题相关代码,请勿粘贴截图
System.loadLibrary("DogJava_x64");
int status;
String info;
int i;
int fsize;
int input = 0;
String strEncrypted;
String strDecrypted;
InputStreamReader reader = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(reader);
Dog curDog = new Dog(Dog.DOG_DEFAULT_FID);
System.out.println("\nThis is a simple demo program for SuperDog licensing API\n");
System.out.println("Copyright (C) SafeNet, Inc. All rights reserved.\n\n");
DogApiVersion version = curDog.getVersion(vendorCode);
status = version.getLastError();
switch (status)
{
case DogStatus.DOG_STATUS_OK:
break;
case DogStatus.DOG_NO_API_DYLIB:
System.out.println("SuperDog API dynamic library not found");
return;
case DogStatus.DOG_INV_API_DYLIB:
System.out.println("SuperDog API dynamic library is corrupt");
return;
default:
System.out.println("unexpected error");
}
运行结果及报错内容
This is a simple demo program for SuperDog licensing API
Copyright (C) SafeNet, Inc. All rights reserved.
SuperDog API dynamic library not found
我的解答思路和尝试过的方法
-Djava.library.path=D:\appworkspace\idea\tex
在目录下的动态链接库存在