File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 9993
    
    7

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
 
Similar Threads
threads
SMS sending functionality working when hard coded. but not working when called through a trigger
How to call trigger from java?
regarding JDK1.7 release
listener to the folder changes in java application.