2fa /* Plays sound clips */ import java.applet.*; import java.io.*; public class SoundClip2 implements Runnable { private String fileName; public SoundClip2(String fileName) { this.fileName = fileName; Thread thread = new Thread(this); thread.start(); } public void run() { File f = new File(fileName); AudioClip theSound; try { theSound = Applet.newAudioClip(f.toURL()); } catch (java.net.MalformedURLException e) { theSound = null; } if (theSound != null) theSound.play(); } public static void main(String [] args) { for (int i = 0; i < args.length; i++) { new SoundClip2(args[i]); try { Thread.sleep(1000); } catch (Exception e) {} } } } . 0