import java.applet.Applet; import java.applet.AudioClip; public class NoisyButton { public static void main(String[] args) throws Exception { java.io.File file = new java.io.File("bark.aiff"); AudioClip sound = Applet.newAudioClip(file.toURL()); sound.play(); } }