Loading Sound Midi

Hello,

Sorry my bad inglish, but what´s loading a file Midi in Java, utilized javax.sound ?


import javax.sound.midi.*;
[...]
Synthesizer synthesizer;
Sequencer o = null;

synthesizer = MidiSystem.getSynthesizer();
synthesizer.open();
o = MidiSystem.getSequencer();
o.open();
o.setSequence(new BufferedInputStream(getClass().getResource("midi.mid").openStream()));
o.start();

[...]

o.stop();
synthesizer.close();

that’s it… basically.

I am having problems with the following line of code:

o = MidiSystem.getSequencer();

This is the error i get:

Exception in thread "main" java.lang.IllegalArgumentException: Requested device not installed: null
	at javax.sound.midi.MidiSystem.getGenericDevice(MidiSystem.java:1073)
	at javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:277)
	at CroAsteroids1.lib.SimpleMidiPlayer.main(SimpleMidiPlayer.java:176)

Any ideas?