• Post Reply Bookmark Topic Watch Topic
  • New Topic

where is getSequencer()?  RSS feed

 
Steve Trigero
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This book I'm going through (Head First Java) is referring to method getSequencer() and refers me to the API to learn what kind of exceptions it throws. Well, when I look in the API (javax.sound.midi and all the sub-classes) there is no getSequencer. There is a getSequence, but no getSequencer. So, where does one find this? And why can't I search the whole API database for something? Following the various API tree branches has been VERY ineffective for finding method documentation.
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check javax.sound.midi.MidiSystem.getSequencer().
 
Steve Trigero
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no MidiSystem under javax.sound.midi in my API. I just downloaded this API a couple weeks ago, so I think it would be up to date.
 
Paul Clapham
Sheriff
Posts: 22838
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The documentation for the method which Garrett linked to says "Since: 1.5". So if you're using Java 1.4 or earlier, you won't see that method.
 
Steve Trigero
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My API says "Java Platform Standard Ed. 6"
 
Carey Evans
Ranch Hand
Posts: 225
Debian Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MidiSystem.getSequencer() with no arguments has been in Java since version 1.3. It's the version with a boolean parameter that's relatively new.

Steve, Garrett's link goes to the online API documentation for Java 6. Where did you get your download?
 
Steve Trigero
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the API here: http://java.sun.com/javase/downloads/index.jsp

I downloaded the "Java SE 6 Documentation" link about half way down the page.

The "book" says to download the API to your computer because it's much easier/faster to use when you have it locally. but when I look at the same API online, I see that it does have the MidiSystem and the getSequencer() method. Did I not download the right one?

 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will do no harm to download the documentation again, but I only use the off-line version when I don't have an active internet connection.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!