I have an object that is calling a JNI function which written in C.

Philip Yu

Your Name class can provide a set of setter/getter functions for the two member variables, like the following:

     public void setFirstName(String first){};
     public String getFirstName() {};
In your native code, use GetMethodID() to reference your functions and set the member variables accordingly.

The Get(type)Field() does not support the jstring type.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.