Merged java/cpp