I want convert a char array in C to jcharArray for the JNI-interface to pass this array from C to Java.
I found a short tutorial which I am using currently: http://joshuaoutwater.info/blog/?p=10
In this tutorial jcharArray resultBuffer1 is passed as a parameter from Java. The problem is that I don’t know how big resultBuffer1 has to be at the time the JNI-method is called. So I need to create this jcharArray with a specific size in my JNI-method.
How can I achieve this?
try it’s: