First draft of java API.