I am working on a Java RPG. And now I want to play background music and other sounds when necessary. For example, the sound of opening a door. How can I play background music always and sometimes sounds?
OpenAL is probably what you are looking for. Bindings are provided by several projects, such as JOAL and the Lightweight Java Game Library .