Reputation: 1311
There are many functions available for calling java from C, However there is no function for call String returning java methods. Can someone please advise how I can call string returning java method from C?
CallBooleanMethod,
CallBooleanMethodV,
CallBooleanMethodA,
CallByteMethod,
CallByteMethodV,
CallByteMethodA,
CallCharMethod,
CallCharMethodV,
CallCharMethodA,
CallShortMethod,
CallShortMethodV,
CallShortMethodA,
CallIntMethod,
CallIntMethodV,
CallIntMethodA,
CallLongMethod,
CallLongMethodV,
CallLongMethodA,
CallFloatMethod,
CallFloatMethodV,
CallFloatMethodA,
CallDoubleMethod,
CallDoubleMethodV,
CallDoubleMethodA,
CallVoidMethod,
CallVoidMethodV,
CallVoidMethodA,
Upvotes: 0
Views: 1024
Reputation: 9884
You can use CallObjectMethod()
and friends. If the JAVA method returns String
. then the jobject
returned can be cast to jstring
and you can use GetStringChars()
to obtain a jchar *
Upvotes: 1