This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello Folks, I wanted to give beep sound using system own inside speaker whenever my application encounters error ,but I donot want to use external speaker ,how I could do this using java. Thanks in Advance Murali
"Excellence is never an accident; it is always the result of high intention, sincere effort, intelligent direction, skillful execution, and the vision to see obstacles as opportunities"
I don't know if this next one will use the system speaker. I suspect not... java.awt.Toolkit.getDefaultToolkit().beep() ;
Joined: Dec 10, 2001
In the first suggestion, I've noticed that if your IDE is capturing the output, the beep won't be heard. If run from the command line, the beep is heard from the system speaker. And I'm pretty sure the second suggestion won't play through the system speaker. Good Luck.
Joined: Nov 18, 2001
Thanks for your reply Dirk,
I will try this line of code and let you know. Regards, Murali