//you need an au file format to use this method
URL url = new URL(
strFileName);
// "file://" + System.getProperty("user.dir") + "/src/edu/uchicago/cs/java/lec10/playsounds/snds/samisen.au");
AudioClip clip = Applet.newAudioClip(url);
clip.loop();
//clip.play();
//Thread.sleep(Long.MAX_VALUE); //this is ugly, but it works without throwing an exception