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).

JNI and Gradle in Android Studio

I'm trying to add native code to my app. I have everything in ../main/jni as it was in my …

android java-native-interface gradle android-studio android-ndk-r7
JNI converting jstring to char *

I have passed a URL string from Java to C code as jstring data type through the use of JNI. …

java java-native-interface
Calling a java method from c++ in Android

I'm trying to get a simple Java method call from C++ while Java calls native method. Here's the Java code: …

java c++ android java-native-interface android-ndk
Converting from signed char to unsigned char and back again?

I'm working with JNI and have an array of type jbyte, where jbyte is represented as an signed char i.…

c++ c java-native-interface
File Operations in Android NDK

I am using the Android NDK to make an application primarily in C for performance reasons, but it appears that …

c file-io java-native-interface android-ndk
How to call a method in DLL in a Java program

I am trying to call a method in a DLL using JNA. So far have loaded the DLL using Runtime.…

java dll java-native-interface jna
How to return an array from JNI to Java?

I am attempting to use the android NDK. Is there a way to return an array (in my case an …

java android arrays java-native-interface
How to bundle a native library and a JNI library inside a JAR?

The library in question is Tokyo Cabinet. I want is to have the native library, JNI library, and all Java …

java jar clojure java-native-interface tokyo-cabinet
How to compile dynamic library for a JNI application on linux?

I'm using Ubuntu 10.10 So that's what I did. Hello.java: class Hello { public native void sayHello(); static { System.loadLibrary("hellolib"); } …

java c++ linux java-native-interface compilation
undefined reference to `__android_log_print'

What is wrong with my make file? Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := foo LOCAL_…

android java-native-interface logging android-ndk