jni.hpp icon indicating copy to clipboard operation
jni.hpp copied to clipboard

A modern, type-safe, header-only, C++14 wrapper for JNI

Results 23 jni.hpp issues
Sort by recently updated
recently updated
newest added

Currently, jni.hpp does not build in Ubuntu 20.04 with GCC 9 and clang 10. These commits fix the issues.

Passing `int` to a method that takes `jlong` likely leads to random stack memory being accessed and thus random trash being passed around. For example, this is the problematic code:...

I have a C++ API that looks like this: ``` class device { public: virtual ~device(); virtual void disconnect() = 0; virtual int read(void *dest, int num_bytes) = 0; virtual...

Needed for custom, non `finalize()`-based, memory management.

Considering the following code: ```java import android.app.Activity; class NativeClassProxy { private long peer; private Activity mActivity; public void initialize(Activity activity) { mActivity = activity; } } ``` ```c++ struct Activity...

Is it possible to pass/receive null-value _form C to java_ and _from java to C_? Can't find a good way to make it by jni

The code at native_method:328 seems incorrect, why would you do std::decay_t&? Comment mine: auto wrapper = [field, initializer] (JNIEnv& e, Object& obj, /*std::decay_t&*/Args... args) // TODO why reference? This causes...