Questions tagged [jniwrapper]
54 questions
1
vote
0 answers
Issue creating Java Native Interface(JNI)
As the title suggested i need some help creating JNI wrapper for this method
std::shared_ptr createFooFactory() noexcept;
The error that i am getting is this
/Volumes/../../projects/xxx_fooFactory.cpp:34:19: error:…

bourne
- 1,083
- 4
- 14
- 27
1
vote
1 answer
Can i control JNI native method invocation name in Java?
I stuck with a problem. I use Chilkat for Java and as i understand there is no, any Maven Repo for it. As it is a two-component library - i need to inject .dll, via System.load(). This part is clear to me, but also they provides something, like…

Rudolphine
- 29
- 4
1
vote
1 answer
JNI - Weird behavior using RxJava in native cpp callback function
I have a c++ function that I want to call from my Kotlin code.
That c++ function gets a callback function as an argument, doing some work and calls the callback when completes.
I already done it a few times before and everything was OK. However, I…

lior_13
- 577
- 7
- 18
1
vote
1 answer
How to convert C++ Array to jfloatArray in JNIWrapper?
I want to map my C++ array output to jniFloatArray.
Tried to follow this solution:
"Convert float* to jfloatArray using JNI"
but I am unable to point float* to array object.
Let's say my output in C++ array output object is:
output = {1.0f ,2.0f…

Khubaib Ahmad
- 141
- 10
1
vote
3 answers
Add new native function to linphone with new java wrapper
Adding custom function to new linphone SDK.
As the developers guided i built liblinphone android sdk by adding small function to bellesip C code . Also added related entry to linphonecore_jni.cc and built linphone-android-sdk. On documentation page…

Srav
- 69
- 1
- 10
1
vote
0 answers
how to call jboss-modules.jar from C++ code using JVM/JNI
I have something like below, which is getting executed on java.exe.
"C:\Program Files\jre\bin\java.exe"
-Djboss.home.dir="C:\Program Files\wildfly" -Djboss.modules.system.pkgs=org.jboss.byteman -Dlogging.configuration=file:"C:\Program…

Ami
- 233
- 2
- 9
1
vote
2 answers
Wrapping a Java library with C++ (JNI)
I have a large programme written in C++ that needs to use a specific Java library. Ideally I would like to create an equivalent C++ library that wraps this existing Java code. As such I have been looking into the JNI invocation API.
Since I am not a…

kahamster
- 51
- 5
1
vote
1 answer
How to implement mapping from type to object method call using C++ templates?
I'd like to develop (yet another) wrapper for java arrays in JNI code using C++ templates. Main goal is to improve my C++ template programming skills.
I compile the code using Android NDK (compiler is Clang 6.0.2)
What I've managed to do so…

wl2776
- 4,099
- 4
- 35
- 77
1
vote
0 answers
Wrapper Function for JNI MethodCall in C++
my question is: is there any good solution to write a wrapper function that recieves variable arguments, can use those arguments but can also pass them to any jni callmethod-function? I have already tried out stuff like variadic functions. I have…

Ben
- 21
- 2
1
vote
1 answer
Why does IE 11 crash when I open a page with applets in 64 bit jvm but works fine with 32 bit jvm?
I have a webpage that loads an applet. If I have 32 bit jre installed, everything works fine, but when I have only 64 bit jre, IE 11 crashes as soon as I open the page.
Also, when I keep both 32 and 64 bit then no matter what I keep in my…

Aman jangra
- 268
- 1
- 16
1
vote
1 answer
Calling JNI c++ methods directly from C++ possible?
Is it possible to call a JNI c++ method (which is normally only used from Java) from c++
Lets say there is an Android library which uses JNI methods and I want to use these methods directly from my c++ code instead of creating a Java layer. Is this…

Simon
- 13,173
- 14
- 66
- 90
1
vote
1 answer
Using jniwrapper custom code in install4j installers
We have an installation script written in install4j.
Our installer needs to call custom code from the library jniwrap.dll.
We included jniwrap.dll into the install4j project and declared it in 'Installer' > 'Custom Code & Resources'.
Unfortunately…

andreasgk
- 673
- 1
- 12
- 30
1
vote
1 answer
jni getMethodID returns Null when used to get ID of constructor
I have assigned jvm to global variable in a function using
int status = (*jenv)->GetJavaVM(jenv, &jvm);
if(status != 0) {
printf(" Fail!\n");
}
classNameC is a global variable, and its class has no constructor.Then in other function,…

HimanshuR
- 1,390
- 5
- 16
- 35
1
vote
1 answer
Not able to run the PJSIP-JNI Wrapper on a standalone java application
I need some documentation for using PJSIP as a Standalone Java Application to understand the flow and implement the Java Wrapper. I have downloaded PJSIP-JNI wrapper, but i am not able to understand how to run the application. I am really struck…

Rajesh
- 11
- 2
1
vote
1 answer
FFmpeg: undefined reference to 'main'
I try to build library and get:
undefined reference to 'main' collect2: ld returned 1 exit status
This is a .c file I've added in jni folder:
#include
#include "creator.h"
// Use to safely invoke ffmpeg multiple times from the same…

Yuliya Tarasenko
- 437
- 2
- 19