• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to trigger a sound file in java cmd  RSS feed

 
Micah Glenz
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I trigger a sound file(I don't care what type the sound file is) in java when the program is just going to ran in the command prompt? Thanks
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Do you mean play some audio file from your code? If yes, check out http://docs.oracle.com/javase/tutorial/sound/playing.html
In case you just want to draw the user's attention, Toolkit#beep() will emit a beep (internally it will use your underlying OS's beep)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!