update official java api and refactor dependencies