projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caaf36d
)
java: Added auto load library code to the SWIG interface file
author
Stefan Andritoiu
<stefan.andritoiu@intel.com>
Tue, 24 Nov 2015 15:03:12 +0000
(17:03 +0200)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Mon, 30 Nov 2015 09:57:58 +0000
(09:57 +0000)
Signed-off-by: Stefan Andritoiu <stefan.andritoiu@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/java/mraajava.i
patch
|
blob
|
history
diff --git
a/src/java/mraajava.i
b/src/java/mraajava.i
index
3618711
..
a97e90c
100644
(file)
--- a/
src/java/mraajava.i
+++ b/
src/java/mraajava.i
@@
-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);
+ }
+ }
+%}