Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using MIDI classes: HF Java

 
Michael Farinha
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Going through some of the code in Head First Java there is a command line Midi player that I created, copied from the book. However whenever I run it, it makes a sound but doesn't end the program, I have to hit [ctrl] + c to end it.
What is it that I'm missing to end the application after the sound plays?
Here is the whole code:

[ September 24, 2006: Message edited by: Michael Farinha ]
 
Daniel Gagnon
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that if you use a GUI, you have to explicitely terminate the program but I would not have thought that it was true for everything in javax...

In any case, add System.exit(0) at the point where you want to terminate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic