Added a pause between Java and c++ to stop the music