aspose file tools*
The moose likes Beginning Java and the fly likes How to trigger a sound file in java cmd Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to trigger a sound file in java cmd" Watch "How to trigger a sound file in java cmd" New topic
Author

How to trigger a sound file in java cmd

Micah Glenz
Greenhorn

Joined: Dec 04, 2013
Posts: 17
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
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10329
    
    8

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)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to trigger a sound file in java cmd