playing mp3 files

Hey guys and gals

I am in a mini competition with a mate as to who make the best music player in java, we havnt done anythign like this before and never ever used soubnd

i understand you have to download the JMF and have doen so and successfully installed it, in fact i can pretty much get it working except for the following error

Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian,

Signed, 16000.0 frame rate, FrameSize=32768 bits

Failed to realize: com.sun.media.PlaybackEngine@182f0db

Error: Unable to realize com.sun.media.PlaybackEngine@182f0db

the code behind it is as follows

import javax.media.*;

import java.net.*;

publicclass MediaPlayer

{

publicstaticvoid main(String[] args)

{

MediaPlayer mp =new MediaPlayer();

}

public MediaPlayer()

{

try

{

Player player = Manager.createPlayer(new URL("http://localhost/test.mp3"));

player.start();

}

catch(Exception e)

{

System.out.println("ERROR");

}

}

}

any ideas are welcome

[1846 byte] By [Drogo_Nevets] at [2007-11-26 9:55:40]
# 1
OK i managed to do some research and figure it out on my own, anyone who is looking at this post for the same reason i wasyou need to look at this page http://java.sun.com/products/java-media/jmf/mp3/download.htmlthats hould help you
Drogo_Nevets at 2007-7-7 1:16:48 > top of Java-index,Development Tools,Java Tools...
# 2

Could someone please explain me how to install the mp3 plugin?

I just wanted to try it, so I copied this source:

import javax.media.*;

import java.net.*;

public class MediaPlayer

{

public static void main(String[] args)

{

MediaPlayer mp = new MediaPlayer();

}

public MediaPlayer()

{

try

{

Player player = Manager.createPlayer(new URL("http://localhost/test.mp3"));

player.start();

}

catch(Exception e)

{

System.out.println("ERROR");

}

}

}

....When I tryed to compile it it had an error :

package javax.media does not exist

I dont know how to install it correctly.

Please help!

Aplayer2FAST4u at 2007-7-7 1:16:48 > top of Java-index,Development Tools,Java Tools...