make jni protocol selectable