0

I wish to program a clock with alarm How can I read the wav file (sound of alarm)into java and play it when the time is up. I can read it from internet with this.

How can I read it from local directory E:\e-project\src\timer

Here is what I read from website, and it works. I wish to read from local

TimerBell =JApplet.newAudioClip(new URL("http://web/~bl348/timer_bell.wav")); 
Yujia Guo
  • 39
  • 6
  • Sorry, the answer in the previous link doesn't seem to be correct. [Try this.](http://alvinalexander.com/java/java-audio-example-java-au-play-sound) – Keale Oct 27 '15 at 02:53
  • Also demonstrated [here](http://stackoverflow.com/questions/29886549/audio-file-plays-in-eclipse-ide-but-not-as-jar-file/29886855#29886855), [here](http://stackoverflow.com/questions/28310900/adding-music-to-java-simplest-way/28310961#28310961) and [here](http://stackoverflow.com/questions/29836255/playing-multiple-sound-clips-using-clip-objects/29836764#29836764) – MadProgrammer Oct 27 '15 at 03:06

0 Answers0