The only reason I can see for it not working is it can't find ding.Wav. I have run it on my system and it works fine.

Make sure the file ding.Wav is in the same directory as the class file and if you are running on a case sensitive OS that the case is correct. You should also try running the wav file directly from the OS to make sure it is outputting an audible sound.