java: Primitive class loading

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