diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/BluetoothManager.java | 9 | ||||
-rw-r--r-- | java/BluetoothObject.java | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/java/BluetoothManager.java b/java/BluetoothManager.java index 4b137da0..1e3d06d7 100644 --- a/java/BluetoothManager.java +++ b/java/BluetoothManager.java @@ -31,6 +31,15 @@ public class BluetoothManager private long nativeInstance; private static BluetoothManager inst; + static { + try { + System.loadLibrary("javatinyb"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load.\n" + e); + System.exit(-1); + } + } + public native BluetoothType getBluetoothType(); public native BluetoothObject getObject(BluetoothType type, String name, String identifier, BluetoothObject parent); diff --git a/java/BluetoothObject.java b/java/BluetoothObject.java index d4576810..672d10d1 100644 --- a/java/BluetoothObject.java +++ b/java/BluetoothObject.java @@ -30,6 +30,15 @@ public class BluetoothObject { long nativeInstance; + static { + try { + System.loadLibrary("javatinyb"); + } catch (UnsatisfiedLinkError e) { + System.err.println("Native code library failed to load.\n" + e); + System.exit(-1); + } + } + /** Returns the BluetoothType of this object * @return The BluetoothType of this object */ |