You last question had 100 replies. This is an indication of a poorly communicated question.
This question is now up to 10 replies. Its time you start to learn to communicate better.
You made the following comment:
but no sound for now
So what does that mean?
You first stated you were getting: Exception in thread "main" java.io.FileNotFoundException: 60s rock beat.wav
Does this mean you have made changes and you no longer get this message?
If so, then you should:
1. tell us the "original" problem has been solved.
2. ask a new question stating your new problem.
This way it keeps the thread concentrated on a single concept.
In any case if you hear no sound, then as I stated in my previous answer you need to add a Thread.sleep(...) otherwise the JVM closes before the wav file can be played. You added your code in the wrong place.
To get the code working first do:
1. forget about the "sounds" folder. Put the .wav files in the same directory as the class file
2. the Thread.sleep(...) needs to be execute AFTER you start the music playing
That is try to solve one problem at a time to keep the logic simple. Once the above two steps work, then you worry about placing the .wav file in a separate folder.
The following example shows how to play 5 second of a song:
Once the above works you move the .wav files to your "sound" directory and then retest.
Give you variables meaningful names so you can understand how to use the variable. Why would you have a static variable and local variable both use the name "file"?