Add java support.

Please the README diff to see an explanation.