java: Unify primitive types

Needed for FFI.

Signed-off-by: Pekka Enberg <penberg@iki.fi>