|
@@ -29,10 +29,10 @@ public class AcsMain {
|
|
|
//System.setProperty("jna.debug_load", "true");
|
|
|
if (osSelect.isWindows())
|
|
|
//win系统加载库路径
|
|
|
- strDllPath = System.getProperty("user.dir") + "\\lib\\HCNetSDK.dll";
|
|
|
+ strDllPath = System.getProperty("user.dir") + "\\supervision-admin\\lib\\HCNetSDK.dll";
|
|
|
else if (osSelect.isLinux())
|
|
|
//Linux系统加载库路径
|
|
|
- strDllPath = System.getProperty("user.dir") + "/lib/libhcnetsdk.so";
|
|
|
+ strDllPath = System.getProperty("user.dir") + "/supervision-admin/lib/libhcnetsdk.so";
|
|
|
hCNetSDK = (HCNetSDK) Native.loadLibrary(strDllPath, HCNetSDK.class);
|
|
|
} catch (Exception ex) {
|
|
|
System.out.println("loadLibrary: " + strDllPath + " Error: " + ex.getMessage());
|
|
@@ -60,15 +60,15 @@ public class AcsMain {
|
|
|
HCNetSDK.BYTE_ARRAY ptrByteArray1 = new HCNetSDK.BYTE_ARRAY(256);
|
|
|
HCNetSDK.BYTE_ARRAY ptrByteArray2 = new HCNetSDK.BYTE_ARRAY(256);
|
|
|
//这里是库的绝对路径,请根据实际情况修改,注意改路径必须有访问权限
|
|
|
- String strPath1 = System.getProperty("user.dir") + "/lib/libcrypto.so.1.1";
|
|
|
- String strPath2 = System.getProperty("user.dir") + "/lib/libssl.so.1.1";
|
|
|
+ String strPath1 = System.getProperty("user.dir") + "/supervision-admin/lib/libcrypto.so.1.1";
|
|
|
+ String strPath2 = System.getProperty("user.dir") + "/supervision-admin/lib/libssl.so.1.1";
|
|
|
System.arraycopy(strPath1.getBytes(), 0, ptrByteArray1.byValue, 0, strPath1.length());
|
|
|
ptrByteArray1.write();
|
|
|
hCNetSDK.NET_DVR_SetSDKInitCfg(HCNetSDK.NET_SDK_INIT_CFG_LIBEAY_PATH, ptrByteArray1.getPointer());
|
|
|
System.arraycopy(strPath2.getBytes(), 0, ptrByteArray2.byValue, 0, strPath2.length());
|
|
|
ptrByteArray2.write();
|
|
|
hCNetSDK.NET_DVR_SetSDKInitCfg(HCNetSDK.NET_SDK_INIT_CFG_SSLEAY_PATH, ptrByteArray2.getPointer());
|
|
|
- String strPathCom = System.getProperty("user.dir") + "/lib/";
|
|
|
+ String strPathCom = System.getProperty("user.dir") + "/supervision-admin/lib/";
|
|
|
HCNetSDK.NET_DVR_LOCAL_SDK_PATH struComPath = new HCNetSDK.NET_DVR_LOCAL_SDK_PATH();
|
|
|
System.arraycopy(strPathCom.getBytes(), 0, struComPath.sPath, 0, strPathCom.length());
|
|
|
struComPath.write();
|