Don't truncate the length.  The lstatNative API needs to supply the length as a 64 bit value.  Which means you may need to use an int[11] and split the 64 bit value into two segments, and put it back together in Java.  Or make the members of the LStat object package accessible and populate them directly inside of the JNI code.  (I say this never having written JNI code... but it must be possible to freeze an object's location in memory and then populate its fields via some sort of set int or set long JNI operation.)