java: Added "automatic load library" code for new sensors

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Stefan Andritoiu
2015-12-04 14:47:59 +02:00
committed by Mihai Tudor Panu
parent 01119436a9
commit 1667569560
3 changed files with 33 additions and 0 deletions

View File

@ -13,3 +13,14 @@
%ignore getRxBuffer();
%include "sx1276.h"
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("javaupm_sx1276");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}