I should have been a bit more elaborate. I'm invoking the JVM from a
c-program using JNI_CreateJavaVM. After invoking the JVM I'm looking
for the class and the method I want to use. I can only find examples
of calling methods that return integer and boolean but none which
return a String.
You invoke all methods in exactly the same way.
Specify the correct signature when you use GetMethodID(), and invoke
the method using CallObjectMethod(). If the method is static, use
GetStaticMethodID() and CallStaticObjectMethod() instead.
The method will return a jstring (reference to an instance of
java/lang/String) from which you can extract the C style string (const
char*) using GetStringUTFChars(). Don't forget to use
ReleaseStringUTFChars() when you are finished using the C string.
/gordon