Commit 03d31749 authored by 赵啸非's avatar 赵啸非

修改so加载路径

parent b1712104
......@@ -44,7 +44,7 @@ public abstract class AbstractHikService {
strDllPath = System.getProperty("user.dir") + "\\lib\\HCNetSDK.dll";
else if (osSelect.isLinux())
//Linux系统加载库路径
strDllPath = System.getProperty("user.dir") + "/../lib/libhcnetsdk.so";
strDllPath = System.getProperty("user.dir") + "/lib/libhcnetsdk.so";
hCNetSDK = (HCNetSDK) Native.loadLibrary(strDllPath, HCNetSDK.class);
} catch (Exception ex) {
log.error("loadLibrary: " + strDllPath + " Error: " + ex.getMessage());
......@@ -68,7 +68,7 @@ public abstract class AbstractHikService {
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 strPath2 = System.getProperty("user.dir") + "/lib/libssl.so.1.1";
System.arraycopy(strPath1.getBytes(), 0, ptrByteArray1.byValue, 0, strPath1.length());
ptrByteArray1.write();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment