very questionable code
This commit is contained in:
parent
5bfc8e4c4c
commit
8370f2a253
|
@ -0,0 +1,6 @@
|
|||
package peak.can.basic;
|
||||
|
||||
public class HackLoadLibraryFlag {
|
||||
// control if library should be auto-loaded or not
|
||||
public static boolean LOAD_LIBRARY = true;
|
||||
}
|
|
@ -325,11 +325,13 @@ public class PCANBasic {
|
|||
public native boolean initializeAPI();
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("pcanbasic_jni");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.out.println(e.getMessage());
|
||||
System.loadLibrary("PCANBasic_JNI");
|
||||
if (HackLoadLibraryFlag.LOAD_LIBRARY) {
|
||||
try {
|
||||
System.loadLibrary("pcanbasic_jni");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.out.println(e.getMessage());
|
||||
System.loadLibrary("PCANBasic_JNI");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue