Review Request JDK-8188052: JNI_FindClass needs to specify the class loading context used for library lifecycle hooks

mandy chung mandy.chung at
Wed Oct 4 18:12:04 UTC 2017

This patch separates the JNI `FindClass` issue from the review thread 
for JDK-8188052 [1] into a different issue.


This patch changes `FindClass` to specify the class loading context used 
for the load and unload hook. `FindClass` when called from JNI_OnUnload 
is changed to use the system class loader as the context. This is an 
incompatible behavioral change and this bumps the version so that a 
native library can determine the new behavior if desire.  This change 
proposes to defines JNI_VERSION_10 and I expect this name will be 
revisited along with the version string for the proposed new release 
cadence [2].


Thanks David for the suggested spec wordings.


More information about the core-libs-dev mailing list