===============================
要導入的包(所有包都帶有java)
導入sun . audio . audio player;
導入sun . audio . audio stream;
導入sun . audio . continuousaudiodatastream;
下面是要添加的代碼(兩行)(它會自動循環)
continuousaudiodastream sound = new continuousaudiodastream(new audio stream(new file inputstream(" F:\ \ sound \ \ song . wav "))。get data());
AudioPlayer.player.start(聲音);