Eclipse is throwing the error :
"MidiSystem.getSequencer cannot be resolved to a type"
I am running JavaSE- 1.7 with compliance level 1.7
Not sure what is going on here
import javax.sound.midi.*;
public class drumKit{
public void play(){
try{
Sequencer sequencer = new MidiSystem.getSequencer();
System.out.println("got it");
}
catch(MidiUnavailableException ex){
System.out.println("Cannot find");
}
}
public static void main(String[] args){
drumKit d = new drumKit();
d.play();
}
}
getSequencer() is a static method , no need to use the new
keyword
public void play(){
try{
Sequencer sequencer = MidiSystem.getSequencer();
System.out.println("got it");
}