Java basis

First draft of the java encoding