change again
This commit is contained in:
parent
8a1c2b240a
commit
e7bb764bd3
|
@ -1,6 +1,5 @@
|
||||||
package com.taosdata.jdbc;
|
package com.taosdata.jdbc;
|
||||||
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -30,22 +29,27 @@ public class TSDBDriverTest {
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
public static void before() {
|
public static void before() {
|
||||||
String osName = System.getProperty("os.name").toLowerCase();
|
String osName = System.getProperty("os.name").toLowerCase();
|
||||||
String libPath = null;
|
if (!osName.equals("linux") && !osName.equals("windows")) {
|
||||||
switch (osName) {
|
islibLoaded = false;
|
||||||
case "linux":
|
|
||||||
libPath = "/usr/lib/libtaos.so";
|
|
||||||
break;
|
|
||||||
case "windows":
|
|
||||||
libPath = "C:\\TDengine\\driver\\taos.dll";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
if (libPath == null)
|
|
||||||
return;
|
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 {
|
try {
|
||||||
System.loadLibrary(libPath);
|
System.loadLibrary("taos");
|
||||||
islibLoaded = true;
|
islibLoaded = true;
|
||||||
} catch (UnsatisfiedLinkError error) {
|
} catch (UnsatisfiedLinkError error) {
|
||||||
|
System.out.println("load tdengine lib failed.");
|
||||||
islibLoaded = false;
|
islibLoaded = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue