If you want to creat an application like an audio player to play mp3 files using Java you can use the JMF mp3 plugin here:
http://java.sun.com/javas...dia/jmf/mp3/download.htmlJava MP3 PlugIn Manual Installation
Unzip the JavaMP3plugin.zip in the JRE directory of your choice.
The included jar file (mp3plugin.jar) contains a Java Sound plugin as well as a Java Media Framework plugin for playing MPEG-2 Layer 3 Audio.
The jar file will be installed in the /lib/ext directory, where stands for the location on your system where the Java Runtime Environment is installed. For instance, on windows, this could be something like C:\Program Files\Java\j2re1.4.2_01.
That will make the plugin available for Java Sound applications and applets run using that specific JRE. If you have multiple JREs installed on your system, you must copy the mp3plugin.jar to each of those JRE installations.
For the plugin to work within a JMF application, you need to :
- ensure that jmf.jar is also in the /lib/ext directory
- run the following command:
java com.sun.media.codec.audio.mp3.JavaDecoder
You should see a message that it was successfully registered, without any error message.
Another library you can use is JLayer, download it here:
http://www.javazoom.net/javalayer/sources.html