Private
Public Access
2
0

java: mraa jni library now dynamically links to libmraa

libmraajava.so was statically linking to mraa object files causing
duplicate mraa platform instances if a UPM Java module was also loaded.

JNI functionality has been moved into src/java/mraajni.c. JVM object is
now set when JVM is loaded; see updates to src/java/mraajava.i.
This was necessary as the JVM object cannot be directly referenced from
mraa as it will not be available when building C/C++ examples.

Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Henry Bruce
2016-02-25 13:37:33 -08:00
committed by Brendan Le Foll
parent 0633cd4145
commit 9d497e08cd
8 changed files with 187 additions and 78 deletions

View File

@@ -44,15 +44,8 @@ extern "C" {
#include <Python.h>
#endif
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
#include <jni.h>
extern JavaVM *globVM;
extern void mraa_java_isr_callback(void *);
#endif
#include <stdio.h>
#include <pthread.h>
#include "common.h"
/**

View File

@@ -28,6 +28,13 @@
#include "types.hpp"
#include <stdexcept>
#if defined(SWIGJAVA) || defined(JAVACALLBACK)
extern "C" {
void mraa_java_isr_callback(void *args);
}
#endif
#if defined(SWIGJAVASCRIPT)
#if NODE_MODULE_VERSION >= 0x000D
#include <uv.h>