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
Regards,
AG

Recommended Answers

All 3 Replies

According to , you need to import the sun.audio 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 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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.