aspose file tools*
The moose likes Beginning Java and the fly likes using MIDI classes: HF Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "using MIDI classes: HF Java" Watch "using MIDI classes: HF Java" New topic
Author

using MIDI classes: HF Java

Michael Farinha
Greenhorn

Joined: Jun 16, 2006
Posts: 26
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

Joined: Aug 27, 2006
Posts: 13
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using MIDI classes: HF Java
 
Similar Threads
Head First Java P346 - MiniMusic Apps - hanging and not returning to the command line
Head First Java - Chapter 11 - MiniMusicCmdLine Error
Running Java Command LIne
Head First Java Ch 11 Example
Head First Java Chapter 11, example on page 346