Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
95 views

I've recently come across FFM as an alternative to JNI for Java-to-C communication. However, I'm struggling with it. Calling C from Java seems straightforward (downcalling). However, calling Java ...
user2430147's user avatar
6 votes
0 answers
444 views

In System.c, the JVM function corresponding to Java’s System.currentTimeMillis() is registered using RegisterNatives. In contrast, System.identityHashCode(Object) calls a JVM function directly based ...
YujiSoftware's user avatar
  • 1,728
0 votes
0 answers
56 views

gRPC service consistently fails with KVS Producer JNI “producer stream creation time out StatusCode: 0xf” about ~15s after “Creating Kinesis Video stream”. REST service (same repo, same JNI .so, same ...
OptimusPrime's user avatar
3 votes
1 answer
104 views

I have an old Java JAR file that depends on .so files (shared object libraries). I understand .so files are native libraries (written in C/C++), and the JAR uses JNI (Java Native Interface) or JNA to ...
IronMan's user avatar
  • 49
0 votes
0 answers
69 views

I'm trying to add the wasmtime c-api library to my app. But I'm getting the following error at runtime: java.lang.UnsatisfiedLinkError: dlopen failed: library "/Users/tufekoi/Repos/...
tufekoi's user avatar
  • 1,041
0 votes
0 answers
21 views

I am trying to integrate GStreamer via JNI into an existing Android Studio project. My Android.mk file looks like this: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := rtsp-...
NotABot's user avatar
0 votes
0 answers
61 views

I'm trying to use Cronet on Android directly from my JNI / C++ layer, not through the Java API. I already have the cronet.so (from Play Services / build output). What I'm missing are the headers (like ...
HARRSH BERMANN's user avatar
2 votes
2 answers
394 views

I have a very large Android project with hundreds of 3rd party libraries. Some of those libraries have native .so libs inside then. I can see all .so files using Android Studio -> Analyze Apk... ...
Alexey's user avatar
  • 7,502
0 votes
0 answers
76 views

I have very little experience with c++ or java and I want to make an Android app with Unreal Engine 5.3, which can either scan or be opened by scanning a QR Code and do something with the Information ...
Logoiuy's user avatar
  • 41
0 votes
0 answers
132 views

Edit to describe the solution: During development, I was making changes to my path. If running java in a Command Prompt window, then that window must be closed and a new one opened to reflect changes ...
Tommy131313's user avatar
0 votes
0 answers
102 views

I'm trying to call the function through the environment variable env, namely env->FindClass("android/os/BatteryManager"), but eventually the error F/libc (27883): Fatal signal 11 (...
Dmitry's user avatar
  • 1
3 votes
3 answers
148 views

I'm trying to handle EINTR error from POSIX connect call. I'm running on OSX this connect code: JNIEXPORT jint JNICALL Java_io_questdb_network_Net_connect (JNIEnv *e, jclass cl, jint fd, jlong ...
Alex des Pelagos's user avatar
2 votes
1 answer
135 views

When working with JNI, can the native side obtain an _Atomic int32_t* given a Java AtomicInteger reference, and run C atomic functions on it (e.g. atomic_fetch_add)? We could call Java's methods (e.g. ...
anon's user avatar
  • 697
0 votes
0 answers
53 views

I use the following statement in unidbg to resolve a class from within an apk package: SampleClass = vm.resolveClass("path/to/class"); Then, I use the SampleClass.callStaticJniMethodObject() ...
Tiano Manti's user avatar
0 votes
0 answers
63 views

I'm developing an Android app using Qt 6.9 that needs to scan WiFi networks. I've created a custom Java class to handle the WiFi scanning, but when I try to call it from C++ using QJniObject, I get a ...
kidtic's user avatar
  • 1
0 votes
1 answer
128 views

As mentioned above, I am using the PN532 reader to connect it with the application. Using the 'libnfc' as JNI library, I built the pn532_uart library as a shared library for 'Arm' based to use the ...
Wan Ammar's user avatar
0 votes
1 answer
57 views

CMake is using JNI headers in /user/local/include and not the ones at $JAVA_HOME CMAKE File cmake_minimum_required(VERSION 3.24.0...3.31.1) cmake_policy(SET CMP0135 NEW) set(...
rkesters's user avatar
  • 128
0 votes
0 answers
54 views

I'm encountering a strange issue with my Android application. I'm receiving crash reports from the Play Console with the following error: Fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed:...
Ghost's user avatar
  • 96
0 votes
1 answer
82 views

My app is a game that consumes a native.so file and has a JNI layer. Whenever the OS kills my app (for example during an in-app update), I see this warning in logcat. What does it mean and how can I ...
Bungles's user avatar
  • 2,319
0 votes
1 answer
68 views

I am using the Rust jni crate, and currently have a native method defined. I am trying to figure out how I get a java field, which is a different class that I have also made, and interact with it ...
An1nterestingName's user avatar
0 votes
0 answers
43 views

I'm try to exec Log.isLoggable after JNI_CreateJavaVM. Got the error as below with Android 14 and above. 01-02 11:35:15.704 24244 24244 F zygote64: runtime.cc:707] Pending exception java.lang....
Nelson's user avatar
  • 183
0 votes
0 answers
36 views

I want to write a native android library that can access shader and texture files from the res/raw folder of my application (or rather res/assets?) without being dependent of a specific activity ...
Zack's user avatar
  • 149
4 votes
2 answers
516 views

All examples I've come across for calling a Java method from C using the Foreign Function & Memory API involve callbacks, that is, a Java method that runs some native function with a Java callback ...
BCartolo's user avatar
  • 769
3 votes
1 answer
179 views

I have an Android app (written in Kotlin), with the processing code running in Rust. I'm using JNI (Java Native Interface) as communication layer. Goal I can successfully return a bool, but I want to ...
NumesSanguis's user avatar
  • 6,452
2 votes
0 answers
77 views

I have a Go method that returns 2 byte arrays and 2 strings defined as: // export GetDetails func GetDetails() (unsafe.Pointer, unsafe.Pointer, *C.char, *C.char) { ... return C.CBytes(arr1), C....
scottstots's user avatar
0 votes
1 answer
78 views

I have an Android app (written in Kotlin), with the processing code running in Rust. I'm trying to send List<String> data to the Rust back-end and interpret it as a Vec<String>. The size ...
NumesSanguis's user avatar
  • 6,452
1 vote
0 answers
36 views

I am trying to pass some initialization values from jni to java. I have been able locate and correctly call the java method from my JNILib Init function but when I try to call it from a different ...
John Am's user avatar
  • 121
2 votes
0 answers
104 views

I have a graphical JavaFX application that is launching a secondary child process using Javaw.exe. Javaw.exe is chosen because I do not want a console window to be visible. After a short amount of ...
Jake Henry's user avatar
-1 votes
1 answer
138 views

I'm working on a class project and about half of our group knows c++ and the other half only knows Java FX. Our project is a synthesizer, which involves a good amount of DSP and GUI stuff. I figured ...
Taylor's user avatar
  • 3
1 vote
0 answers
68 views

Running a Java program on a raspberry Pi 5.0 (64bit) under Open-JDK-17. I'm trying to get Bluetooth working (64bit) with the bluecove Java API. One of my shared libs libbluecove_aarch64.so does not ...
Quentin Meek's user avatar
0 votes
0 answers
159 views

For some time I am trying to solve a bug in our native C++ shared library using traces but it is not easily reproducable (multithreading/networking involved). We have Android (Java) code instantiating ...
nikoladsp's user avatar
  • 155
0 votes
1 answer
165 views

Recently, I have been working on a small gui app that uses GTK4. This gui app uses a combination of Java and Rust (I am using the jni crate for interop). I am creating the Gui window using the Gtk-rs ...
Radon's user avatar
  • 117
0 votes
1 answer
49 views

I am using fmod library in my Android app to filter sound. There is a crash in GP console and I can't reproduce it on my device. Here is the backtrace: JNI DETECTED ERROR IN APPLICATION: java_object ==...
filipst's user avatar
  • 1,573
13 votes
2 answers
305 views

I think I've found a bug, but I'm not sure whether to blame the JVM, JNI, NASM, GCC, or ld. The bug causes my compiled modding language called grug (see this for videos and explanations) to ...
MyNameIsTrez's user avatar
4 votes
1 answer
264 views

My goal is to catch SIGSEGV (infinite recursion), SIGALRM (infinite loops, raised by a timer), and SIGFPE (division by 0) from native code, since I want to prevent Minecraft (Java) from crashing or ...
MyNameIsTrez's user avatar
0 votes
0 answers
40 views

I'm working on an Android app consisting of Kotlin (for the UI/UX) and C++ (app logic). I'm using JNI to bridge C++ to Kotlin. When a new thread is created, AttachCurrentThread is invoked to attach ...
NightFuryLxD's user avatar
0 votes
0 answers
66 views

I'm trying to call JVMTI->IterateOverInstancesOfClass from JNI (like here) but the call is getting stuck. I aim to find an instance of a specific class to call a non-static method. I saw this ...
davidlevi1234's user avatar
1 vote
0 answers
64 views

I have a program in jni (java native interface), which should display the text "hello world" in C #include "MyJavaClass.h" #include <jni.h> #include <stdio.h> // ...
Cabralito's user avatar
0 votes
1 answer
79 views

I am working in Java on Windows OS. I’m using System.loadLibrary to load called A.dll, which exposes some JNI functions. A.dll depends on B.dll. I put A.dll and B.dll on a repo, told my colleague to ...
aniceempanada's user avatar
0 votes
1 answer
119 views

I am developing a custom Gluon Attach plugin and encountering issues with passing a Java Runnable object from Java to JNI. Despite reviewing the Gluon Attach plugin source code (which unfortunately ...
CTO - Abid Maqbool's user avatar
1 vote
0 answers
69 views

I have a C++ method : class classA { public: bool methodA(const char* a, const int b, char* c); } This is used in the C++ application as follows: int q = 5; char returnOutput[512] = "...
Shreyak Mysore Shamprasad's user avatar
1 vote
1 answer
107 views

I have been trying to debug a non user perceivable crash in my app (I think it happens in the background) that originated from the Android Runtime due to possibly a deadlock/thread contention. ...
peakpeakt's user avatar
1 vote
1 answer
93 views

Two doubts from JNI Design Overview docs: The JNI interface pointer is only valid in the current thread. A native method, therefore, must not pass the interface pointer from one thread to another. A ...
Jatin guglani's user avatar
0 votes
0 answers
58 views

I have a Java program that uses a native DLL file. It works perfectly on my development machine but fails with a UnsatisfiedLinkError or a "file not found" error when I run it on another ...
Hannan Sani's user avatar
1 vote
1 answer
72 views

My app is C++, it creates a JNI JVM (raw JVM, with class path to some of my .class files). The JVM above is rather a core Java Virtual Machine without knowing about android. How to add class path to ...
Dan D's user avatar
  • 8,769
1 vote
1 answer
253 views

First run main.exe it said can not find jvm.dll So I copy jvm.dll from C:\Program Files\Zulu\zulu-21\bin\server to ./ Then this is my workspace. ls jvm.dll main.cpp main.exe main.obj But second ...
kouhe3's user avatar
  • 59
-1 votes
1 answer
192 views

I'm working on a Minecraft library for my own mods to use and i ran into a problem with JNI. I'm still new to the JNI and c++ stuff so i might've made a mistake but after hours of searching i didn't ...
Progames723's user avatar
1 vote
1 answer
75 views

I am fairly new with cpp or jni in android. I have few lines of code in kotlin which I want to move it to cpp, reason being want to make the validation in bit more secure way. Kotlin code: val entries ...
04Ant01's user avatar
  • 13
0 votes
1 answer
240 views

We have a large C++ library for which we have created Java bindings using SWIG (so a JNI shared library). We build for and run tests on many build platforms across macOS, Linux, and Windows; debug and ...
Nick Williams's user avatar
0 votes
0 answers
40 views

I'm trying to use JSI and JNI in a React-Native app for sending ArrayBuffer without encoding data. For this, I have a C++ function receiveDataFromCpp(): extern "C" JNIEXPORT void JNICALL ...
Stéphane R.'s user avatar
  • 1,515

1
2 3 4 5
197