CPP and JNI to print