JNI switch part 1