Remove java hard dependency

See #893