Java equivalent of C# system.beep?

You can use this:

java.awt.Toolkit.getDefaultToolkit().beep();

EDIT

If you are trying to play anything of duration and with different sounds you should really look into the Java MIDI library. The default beep won’t be able to meet your needs as you can’t change the length of the beep.

http://www.oracle.com/technetwork/java/index-139508.html

Leave a Comment