提交 e7bb764b 编写于 作者: Z zyyang

change again

上级 8a1c2b24
package com.taosdata.jdbc;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
......@@ -30,22 +29,27 @@ public class TSDBDriverTest {
@BeforeClass
public static void before() {
String osName = System.getProperty("os.name").toLowerCase();
String libPath = null;
switch (osName) {
case "linux":
libPath = "/usr/lib/libtaos.so";
break;
case "windows":
libPath = "C:\\TDengine\\driver\\taos.dll";
break;
default:
}
if (libPath == null)
if (!osName.equals("linux") && !osName.equals("windows")) {
islibLoaded = false;
return;
}
// String libPath = null;
// switch (osName) {
// case "linux":
// libPath = "/usr/lib/libtaos.so";
// break;
// case "windows":
// libPath = "C:\\TDengine\\driver\\taos.dll";
// break;
// default:
// }
// if (libPath == null)
// return;
try {
System.loadLibrary(libPath);
System.loadLibrary("taos");
islibLoaded = true;
} catch (UnsatisfiedLinkError error) {
System.out.println("load tdengine lib failed.");
islibLoaded = false;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册