Why I should not reuse a jclass and/or jmethodID in JNI?
The rules here are clear. Method ID and field ID values are forever. You can hang onto them. The lookups take some time. jclass, on the other hand, is generally a local reference. A local reference survives, at most, the duration of a single call to a JNI function. If you need to optimize, you … Read more