NebulaStream
0.6.213
NebulaStream is a data and application management framework for the internet of things
|
#include <JNI.hpp>
Public Member Functions | |
JVM () | |
void | init () |
Initialized the Java Virtual Machine with specific options and a classpath. More... | |
JVM & | addOption (const std::string &options) |
Adds a option to the JVM. Throws an exception if the JVM is already started. More... | |
JVM & | addClasspath (const std::string &classPath) |
Appends a classpath to the JVM before initialization. More... | |
bool | isInitialized () |
Indicates if the JVM was already initialized. More... | |
Static Public Member Functions | |
static JVM & | get () |
Returns an instance to a JVM, which may or may not be initialized yet. More... | |
When the application's entry point is in C++ rather than in Java, it will need to spin up its own instance of the Java Virtual Machine (JVM) before it can initialize the Java Native Interface. Vm is used to create and destroy a running JVM instance. The JVM is stored in a global static variable. So it can be initialized exactly once. Any further initialization causes an exception. Before creation, the addOption and addClasspath methods can be used, to configure the JVM instance.
As only ever one JVM instance can be created, it is shared by different users. For instance, for the execution of UDFs or as a compilation backend.
|
inline |
JVM& NES::jni::JVM::addClasspath | ( | const std::string & | classPath | ) |
JVM& NES::jni::JVM::addOption | ( | const std::string & | options | ) |
|
static |
void NES::jni::JVM::init | ( | ) |
Initialized the Java Virtual Machine with specific options and a classpath.
bool NES::jni::JVM::isInitialized | ( | ) |
Indicates if the JVM was already initialized.