Add java implementation