#include "jmsg_vm.h"
#include "jmsg_host.h"
-#include "jxbt_utilities.h"
+#include "jxbt_utilities.hpp"
#include "src/plugins/vm/VirtualMachineImpl.hpp"
#include "xbt/ex.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
-SG_BEGIN_DECL()
+extern "C" {
extern int JAVA_HOST_LEVEL;
static jfieldID jvm_field_bind;
env->ReleaseStringUTFChars(jname, name);
jvm_bind(env, jVm, vm);
- jVm = env->NewWeakGlobalRef(jVm);
+ jVm = env->NewGlobalRef(jVm);
// We use the extension level of the host, even if that's somehow disturbing
vm->extension_set(JAVA_HOST_LEVEL, (void*)jVm);
}
return static_cast<jobject>(host->extension(JAVA_HOST_LEVEL));
}
-SG_END_DECL()
+}