A simple song playback is not working

I have a song rasputin.mid in my G:\java files1\jmf folder of my computer.

I have written this simple program to play this song but i get an error

import javax.media.*;

import java.io.*;

publicclass JMF1

{

publicstaticvoid main(String args[])throws Exception

{

File file=new File("G:/java files1/jmf/rasputin.mid");

Player player=Manager.createRealizedPlayer(file.toURL());

player.start();

}

}

This is the error i am getting

Error: Unable to prefetch com.sun.media.content.midi.Handler$MidiController@197d257

I can't understand what is wrong with the code. I have taken the code from the IBM tutorials. The path and the classpath are perfectly ok and they have been set during the installation process by the jmf itself.

[1248 byte] By [qUesT_foR_knOwLeDgea] at [2007-11-26 19:33:04]
# 1
I have cross posted this here. http://forum.java.sun.com/thread.jspa?threadID=5140786I haven't got any answers there till now. If i get an answer there i will declare it in this post.
qUesT_foR_knOwLeDgea at 2007-7-9 22:05:01 > top of Java-index,Security,Cryptography...
# 2
It seems not all MIDI files are equally well written.I found that Java would not load or play a variety of MIDI files.Does the file load/play OK in JMStudio?
AndrewThompson64a at 2007-7-9 22:05:02 > top of Java-index,Security,Cryptography...
# 3

> It seems not all MIDI files are equally well

> written.

> I found that Java would not load or play a variety

> of MIDI files.

>

> Does the file load/play OK in JMStudio?

Yes you are right. I just discovered it before you could post it. Anyways thanks Andrews.

However coming to how i went about it.

The trouble was with the MIDI file. The same program is working fwith a mp3. So even my hunch proved to be right. Initially i thought of playing a .wav file but just then i remembered that jmf 2.1.1 supports .mp3 audio format and thought of giving it a try and here it is-working as good as the wind that blows across the azure sky.

qUesT_foR_knOwLeDgea at 2007-7-9 22:05:02 > top of Java-index,Security,Cryptography...