public class MP3Player {

    public static void main(String[] args) throws Exception {
       File file = new File("xyz.mp3");
       MediaLocator mrl = new MediaLocator(file.toURL());
       Player player = Manager.createPlayer(mrl);



when i execute above program, it shows error :
Failed to configure:
Bad header in the media: Couldn't detect stream type
Error: Unable to realize )
Any explaination for the above error ??

is that JMF code?
does look so like me. if it is, dump it. JMF is very outdated and hasn't been maintained for over years. there are better and more efficiënt ways to play mp3 files these days.

also: never allow your main method to throw Exceptions. nothing good can come from it.