Java Native Interface - Quickie

webmasterbeta

New Member
This is just a quick question/suggestion request....if you know about JNIthat is:My Java program calls a C function (in a DLL).The result of the C function is several Strings.How would you best go about communicating these strings back to the Javaprogram?They do not have to be done all at once; one string can be passed to thejava program at a time, if necessary.thanks.ADDITIONAL:-----------Would/Could you:a) simply pass the string back as the return value (how do you convertingthe C char array into a jstring)b) pass the C char array back as the return value (how do you convert andpass arrays as a return value)c) place the C array contents directly into a char array in the java program(how do you convert C char element into a Java char element)d) ...the list goes on....John.
 
Back
Top