Most voted "jni" questions
The Java Native Interface (JNI) gives both the ability for JVM implementations to execute native system code as well as the ability for native code to execute Java code (by creating new instances of JVM).
Learn more…10 questions
Sort by count of
-
11
votes2
answers1232
viewsUsing Java together with C
I am working on a micro controller project. My source is all in C however I would like to interact with this program using Java. Would that be possible? For example: The C program executes…
-
5
votes2
answers180
viewsWhy does the statement "char *argv[]" work in the main rg, but not in the body of the code?
Why when I use the declaration char *argv[] in the int main(int argc,char *argv[]) works, but when I try to use it inside the body of the code with char *argv[]; it doesn’t work? The error below is…
-
3
votes1
answer116
viewsError "Java" and "C" integration through JNI
Personal I am not managing to consume functions of a lib in "C" using Java with JNI. Follow my artifacts and the error generated. Class CalculadoraJNI: public class CalculadoraJNI { // Declaração do…
-
2
votes1
answer159
viewsWhy do classes with underline ("_") in Java become "_1"?
I’m using JNI, using C and Golang, by default we use something like arquivo_windows.go or arquivo_android.go, so I preferred to also call the Java files the same way. So I created a class named…
-
1
votes1
answer61
viewsWhat is the difference between these two means of obtaining the Packagename?
I have these two code snippets, the two of them display the same result, so I’d like to know, what’s the difference between them. 1 jclass cls = (*env)->FindClass(env,…
-
1
votes0
answers480
viewsError Reading . jar; error in Opening zip file
I have a Java desktop application that uses Jasperreport for reporting, the application runs normally on my machine, but on my client’s machine it does not. Below is the Stack Trace when the…
-
1
votes0
answers18
viewsDisplay array during debug with android NDK
On android, when debugging my program I can see the vector and content of it: I have to pass this vector from android (java) to C++ and I’m using NDK. public native void testeVetor(double[]…
-
1
votes1
answer679
viewsHow to get the Package Name from an Android app in a C library?
I would like to know how I can get the Package Name of my Android APP through a library written in C. What I want to get is this com/meu_app/mainframe/MainActivity or…
-
1
votes0
answers265
viewsAndroid - How to Create a Loop Properly in an Activity and Pause It and Summarize It
I have a project of a CHIP-8 emulator that I’m trying to port to android, the entire emulator is written in C++ so I created a C++ library in android studio and added it to my project, the problem…
-
0
votes1
answer86
viewsC++ Character buffer adding no characters
Well, I have an application for android that uses Opengl ES 3.1, I did all the procedure to compile the shaders, I decided to put them in a separate folder in Assets, to recover the content I am…