Playing an audio clip in a Java applet can be done as shown in the following example.

 public void init() {
    // Load audio clip
    AudioClip ac = getAudioClip(getDocumentBase(), 
  "http://hostname.com/my-audio.au");
    
    // Play audio clip
    ac.play();
    
    // Stop playing audio clip
    ac.stop();
    
    // Play audio clip continuously
    ac.loop();
}