I have been developing a simple java game, however I would like to add some Music to my game because it seems quite boring whenever you play it.
tons of way. depends on the version of Java you are using, the type of audio file you want to play, whether we are talking about background music or sound-effects, ...
Java support for media has beena shambles inthe past - JMF never worked properly.
The good news is that JavaFX is now a standard component in all the current versions of JavaSE. JavaFX has excellent support for media.
See this recent thread - especially the last two posts
You can download nova flux
It has useful tools for playing Ogg Files. You would want to use the OggManager from the audio package
to Load the Ogg you would want to say:
to play the Ogg you would say:
The Library is designed to make games but if you just want to use the audio features it should work just fine