Jj Roberts wrote:
I fiddled around with this once for fun. I don't know why, or if it is the right thing to do, but putting the line before the clip.start() got it to work for me. Your example works for me with this line included. I don't know anything about audio, so I can't tell you more, but you could try and see if it works.
It was amazing how tough it was to find guidance on how to execute a simple sound clip in Java
however, the only thing missing from my code was the main method which instigated the code - so you pretty much had all the context you needed.