Top "Java-native-interface" questions

The Java Native Interface (JNI) gives both the ability for JVM implementations to run system native code and the ability for native code to run Java code (by creating new JVM instances).

error: base operand of ‘->’ has non-pointer type ‘JNIEnv’

#include <stdio.h> #include <jni.h> JNIEnv* create_vm() { JavaVM* jvm; JNIEnv* env; JavaVMInitArgs args; JavaVMOption …

java java-native-interface
Generating Java interface with SWIG

I'm using SWIG to make a Java wrapper of a C++ library (about Json (de)serialization) to use it on …

java c++ java-native-interface swig
Android - failure on loading library

I have a similar problem to this question, but slightly different. I have compiled a .so library to use with …

java android java-native-interface native
Android ICS : JNI error attempt to use stale local reference 0x1

After upgrading my phone to android 4.03 ics my game dosent open anymore ,it just closes without any error messege on …

android opengl-es android-ndk java-native-interface
How to debug an App on Android with GDBSERVER?

I'm trying to debug a native shared library that my App uses through JNI. I can attach to a running …

android debugging gdb java-native-interface gdbserver
Adding a JNI library to the local Maven Repository

I wish to add a JNI library, including its shared object (.so) file to my project using Maven. Unfortunately it …

java maven java-native-interface maven-nar-plugin
How to target multiple architectures using NDK?

Background I've recently started to develop some code using the NDK, and I've thought of a possible portability problem that …

android android-ndk java-native-interface cpu-architecture
How to use javah

I've just wasted 2 hours trying to do something which I've already done twice before. I can't remember the exact procedure …

java java-native-interface javah
What is a native implementation in Java?

If we look at the Java Object class then we can find some of the methods like: public native int …

java java-native-interface
What is the quantitative overhead of making a JNI call?

Based on performance alone, approximately how many "simple" lines of java is the equivalent performance hit of making a JNI …

java performance java-native-interface