Add generated JNI detection, update samples