Private
Public Access
2
0

java: Added auto load library code to the SWIG interface file

Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Stefan Andritoiu
2015-11-24 17:03:12 +02:00
committed by Brendan Le Foll
parent caaf36dfb6
commit 93839d4865

View File

@@ -66,3 +66,14 @@ class Spi;
return JNI_VERSION_1_8;
}
%}
%pragma(java) jniclasscode=%{
static {
try {
System.loadLibrary("mraajava");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. \n" + e);
System.exit(1);
}
}
%}