Let\'s say that on the C++ side my function takes a variable of type jstring named myString. I can convert it to an ANSI string as follows:
jstring
myString
If we are not interested in cross platform-ability, in windows you can use the MultiByteToWideChar function, or the helpful macros A2W (ref. example).