Add support for java

Closes #7