fixed #2 Replaced java file with its c++ equivalent