Hey,

Is there a way to play a system beep on mac os x in Java? I usually use the beep function in Toolkit class for my PC but I tried the beep function in Toolkit but it doesn't work on my mac. Any help?

Thanks in advance!

Recommended Answers

Instead of using Toolkit class , try using ascii code..

System.out.println("\007");

Inform me whether it works or not......

Jump to Post

All 3 Replies

Instead of using Toolkit class , try using ascii code..

System.out.println("\007");

Inform me whether it works or not......

I think it should work.
Did you tried it in C

printf("\a");

The other alternative is call the exe file from the java..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.