Add a java implementation