I want to play an audio file when certain conditions are met but I can't figure it out. I am inexperienced in java and programming in general and copied several blocks of code and none of them work.
Trying to play this:
File type: .mp3
Location: C:\Users\Public\Music\Sample Music
I wasted close to two hours on this. Plz help with code that just plays audio from a file. Thank you.
Update: I keep getting this error
Multiple markers at this line
- Access restriction: The type AudioStream is not accessible due to restriction on required library C:\Program Files (x86)\Java\jre1.8.0_25\lib\rt.jar
- Access restriction: The type AudioStream is not accessible due to restriction on required library C:\Program Files (x86)\Java\jre1.8.0_25\lib\rt.jar
- Access restriction: The constructor AudioStream(InputStream) is not accessible due to restriction on required library C:\Program Files (x86)\Java