diff options
author | Stefan Andritoiu <[email protected]> | 2016-01-26 19:46:20 +0200 |
---|---|---|
committer | Petre Eftime <[email protected]> | 2016-01-27 15:08:14 +0200 |
commit | 706445a43828269019851e34861f949a1232ebe0 (patch) | |
tree | 4dd4a761778e5874d6879ac0aa28f2063af13305 /java/BluetoothObject.java | |
parent | 19dd2319b393f7e5ec0610336a6e5741b46c9a4c (diff) |
java: Added "autoload library" code
Signed-off-by: Stefan Andritoiu <[email protected]>
Diffstat (limited to 'java/BluetoothObject.java')
-rw-r--r-- | java/BluetoothObject.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 */ |