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!

jni: .NET System::String to jstring

843829Jul 9 2009 — edited Jul 9 2009
Hi people,
I have a problem converting a System::String of .NET to a jstring.
i tried
globalEnv->NewStringUTF(myvar);
but that didnt do it.

1>.\my.cpp(78) : error C2664: 'JNIEnv_::NewStringUTF' : cannot convert parameter 1 from 'System::String ^' to 'const char *'

now i'm pretty lost.
any ideas?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2009
Added on Jul 9 2009
3 comments
651 views