Java support

pls review and merge