I'm running a java (Netbeans) application on Ubuntu 10.10. The following code plays the sound correctly the first two times it is invoked. On the third invocation, the application hangs and I have to kill the process. Any ideas?
try {
String path = ApplicationContext.getInstance().getAppDirectory();
java.net.URL url = new java.net.URL("file:"+path+"my.wav");
java.applet.AudioClip clip = java.applet.Applet.newAudioClip(url);
clip.play( );
}catch (java.net.MalformedURLException malex){
Logger.log(malex);
}
No exception or error is reported.