1,105,402 Community Members

Is there a way to play a system beep on mac os x?

Member Avatar
caswimmer2011
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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!

Member Avatar
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 56 [?]
Q&As Helped to Solve: 51 [?]
Skill Endorsements: 4 [?]
 
0
 

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

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

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

Member Avatar
caswimmer2011
Light Poster
33 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Nah, no beep

Member Avatar
harinath_2007
Posting Pro
509 posts since Aug 2010
Reputation Points: 56 [?]
Q&As Helped to Solve: 51 [?]
Skill Endorsements: 4 [?]
 
0
 

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

printf("\a");

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

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: