I am writing a JNI application. In my C++ code, I have std::string. I need to obtain a jchar * from it to pass to a Java function. How do I do this?
std::string
jchar *
Use env->NewStringUTF(), to create a new java-string from a char*.
env->NewStringUTF()
char*