[java/cs] Lib.nativeArray works correctly now. Closes #2049