| 190 | } |
| 191 | |
| 192 | bool initField(JNIEnv *env, jclass cls, jfieldID& field, const char *name, const char *signature) |
| 193 | { |
| 194 | field = env->GetFieldID(cls, name, signature); |
| 195 | if (field == NULL) |
| 196 | { |
| 197 | std::cerr << "Failed to initialize field " << name << std::endl; |
| 198 | return false; |
| 199 | } |
| 200 | return true; |
| 201 | } |
| 202 | |
| 203 | bool initMethod(JNIEnv *env, jclass cls, jmethodID& method, const char *name, const char *signature) |
| 204 | { |