I'm starting to learn how to play sounds in Java applications.
I've come across two packages that enable the programmer to do this: sun.audio
and javax.sound
.
What are the differences between the two? Advantages and disadvantages?
javax.sound
is the official, documented, supported, Java Sound API. It should be included in any 1.3+ JRE. Use it with confidence that it will be there in the next release.sun.audio
isn't (the majority of those things). Don't use it.