ffi/java: pointers are stored as `long` so they grow with the architecture