blob: e86fe16d3f71d263c2b6d186a37ce5575530bea2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.yahoo.nativec;
import com.sun.jna.Native;
import com.sun.jna.Platform;
class NativeC {
protected static Throwable loadLibrary() {
if (Platform.isLinux()) {
try {
Native.register(Platform.C_LIBRARY_NAME);
} catch (Throwable e) {
return e;
}
} else {
return new RuntimeException("Platform is unsúpported. Only supported on linux.");
}
return null;
}
}
|