J2ME (MMAPI) Player option plroblem Urgent...
Hi all,
I am exploring about MMAPI. I wrote a small program to play a wav file from the jar file. But it is showing Exception. I dont know why it comes exception. The code is
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.media.*;
import javax.microedition.media.control.*;
import java.io.*;
private Player player;
private InputStream is;
publicvoid playRingTone()
{
try
{
is = getClass().getResourceAsStream("test-wav.wav");
player = Manager.createPlayer(is,"audio/X-wav");
player.start();
}
catch(IOException e)
{
System.out.println("Error = "+e);
}
catch (MediaException me)
{
System.out.println("Error = "+me);
}
}
Please check and help me to solve the problem to continue my other options in this API.
Thanking you,
Regards,
Dhanalakshmi

