Hi to all,

I'm developing a sound application. I only want to acced to server, download a song and play it on my mobile phone. As a server, I'm using the program "Apache", so I acced to the song by an HTTP connection, which url is http://localhost/song.mp3.
I would like to know what packages or which libaries should I include in my program to use methods like "Player player = Manager.createPlayer(is,"audio/mpeg");" and so on.
The code of the program is as follows:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.io.*;
import java.io.*;
import org.kxml.parser.*;
import org.kxml.*;
import org.kxml.io.*; //incluida
import org.kxml.kdom.*;//incluida
import org.kxml.wap.*;//inlcuida

public class musica extends javax.microedition.midlet.MIDlet implements Runnable {
private VolumeControl vc;

public void run()
String url = "http://localhost/luis.mp3";
HttpConnection conn = (HttpConnection)Connector.open(url,
InputStream is = conn.openInputStream();

Player player = Manager.createPlayer(is,"audio/mpeg");

// get volume control for player and set volume to max
vc = (VolumeControl) player.getControl("VolumeControl");
if(vc != null)
catch(Exception e)

protected void startApp() throws MIDletStateChangeException {



* @see javax.microedition.midlet.MIDlet#destroyApp(boolea n)
protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

* @see javax.microedition.midlet.MIDlet#pauseApp()
protected void pauseApp() {

Thank you very much,