I want to alert the user in a Swing application of certain events with an old fashioned PC Speaker beep, since not on every PC there is a soundcard with an attached speaker. (At least on my work PC there is no speaker, with a reason. :-) How can I do this?
UPDATE: java.awt.Toolkit.getDefaultToolkit().beep() seems usually to generate a sound on the soundcard. It only uses the speaker if there is no active soundcard. To print an ASCII value 7 works only if the application is launched in a terminal, which at least a Swing app usually isn't. So the question is still open.