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:
committed by
Brendan Le Foll
parent
caaf36dfb6
commit
93839d4865
@@ -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);
|
||||
}
|
||||
}
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user