Questions tagged [jniwrapper]
54 questions
0
votes
1 answer
Does `jobject` always have the same address if it represents the same Java instance?
Given a java object A a = new A(), and a bunch of native instance methods, if I were to take the address of the jobject representing a passed into those methods, would the address always be the same?
I have multiple final fields in these classes…

Mario Ishac
- 5,060
- 3
- 21
- 52
0
votes
1 answer
How to send a jchararray as parameter to C function
I am trying to use a C library (Pre-written and published) in an android app. I started my effort about writing a JNI wrapper around this C library. I can't figure out how to pass in jchararray properly to C.
int getData(char data[], const int…

Ashok Bommisetti
- 314
- 1
- 3
- 15
0
votes
0 answers
creating a .h file for a DLL file, if you do know the method signatures
I am trying to access the methods of a DLL file in Java.
I wanted to use ComfyJ to create a wrapper for the DLL file.
ComfyJ has a wizard for this, however when I select the DLL file, it says that it cannot use this kind of DLL file.
So, next I…

bvdb
- 22,839
- 10
- 110
- 123
0
votes
0 answers
SWIGTYPE pointer value assignment is slow
I am using SWIG to wrap certain c++ code for Java through JNI.
In Java I have
SWIGTYPE_p_int A = new example.new_array(n);
for (int i = 0; i< n ; i++)
example.setitem(A,i,2*i);
and I pass the array to C++ , but when n is large and I have to…

Bob
- 119
- 4
0
votes
1 answer
Writing to registry on Windows 7 64-bit by means of JNIWrapper - Performance issue
Our installation uses jniwrapper library.
Now, we started installing on Windows 7 64-bit machines and are facing a problem.
To write values to registry we use the function
com.jniwrapper.win32.registry.RegistryKeyValues.put()
As long as we install…

andreasgk
- 673
- 1
- 12
- 30
0
votes
1 answer
Issue with writing FaceRecognizer for Java with OpenCV 2.4.8
I have been given a project based around face recognition written in JavaCV to be improved. The idea was to either rewrite the program using C++ or write JNI bindings to still use Java. I did some research and according to the official website…

f78xd23
- 117
- 2
- 15
0
votes
1 answer
Can not integrate .so library from working project to another one
I have working project where I use JNI to call methods from C library.
My project's structure:
And code which load library:
static {
System.loadLibrary("RemoveBackground");
}
It works good. But until I try to integrate this functionality in…

Val
- 4,225
- 8
- 36
- 55
0
votes
1 answer
FFmpeg: java.lang.UnsatisfiedLinkError while calling Runnable class
I need to take a picture file and an audio file and create a video.
I know that it's possible to do with the help of
Runtime.getRuntime().exec("ffmpeg -i image.jpeg -i audio.mp3 out.avi")
but only for rooted devices, so I've tried to create JNI…

Yuliya Tarasenko
- 437
- 2
- 19
0
votes
1 answer
JNI methods with more than one argument?
I am new to JNI and I wanted to pass three integer to the below function
void pauseEffectJNI(unsigned int nSoundId)
{
// void pauseEffect(int)
JniMethodInfo methodInfo;
if (! getStaticMethodInfo(methodInfo,…

user1169079
- 3,053
- 5
- 42
- 71