java: Added auto load library code in upm SWIG interfaces

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-11-23 17:04:32 +02:00
committed by Mihai Tudor Panu
parent 500e14663b
commit dddba3e8a4
118 changed files with 1298 additions and 14 deletions

View File

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