Moved jni code to be with main code base