merge java implementation to master

sdffsbgf