User login |
Use PC Speaker from JavaGetting the PC speaker to emit a annoying beep might seem to be a quite easy task. And it is provided that you are in a graphical environment such as X.org och MS Windows™. Then using this easy bit of code will do: But if you (like me) wants to run a console application Toolkit.getDefaultToolkit().beep(); seems to do nothing. Then the following lines will do (at lest on Linux® based operating systems).
|