Adding sound in java


I want to add sound in my Java program. I searched in Internet, and what I found was only how to add sound to java applet. Isn't there any way to insert sound into the desktop application java?

Thanks in advance


According to this web site, you need to import the package. Haven't tried this myself, but maybe you can get it to work?

Here's another resource from Oracle that's much more in-depth.

Here's one more link which may help.

BTW, my search terms in Google were "java add sound application" to find the above links.


@kramerd : thanks a lot for your reply. I have checked all 3 of them, and I still found that those work in applet, just like what I found when I searched in google :( Is there any other ways to add sounds into non-applet app? or can I apply the applet methods for the non-applet?
Thanks again :)


ohh sorry,, the first link gave the way to play sound in common Java app :D yoohoo!! thanks a lot dude! I do appreciate your help :)

Question Answered as of 4 Years Ago by kramerd
This question has already been solved: Start a new discussion instead
Start New Discussion
Tags Related to this Article