Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Converting jcharArray to const char*

843829Mar 4 2003 — edited Mar 11 2003
Hello everyone.

This is my first time posting a problem, and I hope you can help me out. I have a JNI function that takes as an argument a Java character array (expressed as a jcharArray in the JNI function argument list). What I am trying to do is convert that array into a const char* pointer for use with some existing C++ code. I've been trying lots of different JNI function combinations (GetCharArrayElements, GetCharArrayRegion, etc.), but have not come up with a winning combination yet. Any suggestions? Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2003
Added on Mar 4 2003
4 comments
5,437 views