Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

A Question on Applet Audioclips

Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javaranch......I have a problem....

I think my question would be more appropriate on this category and not the JSP category since playing sound files and applets are related with each other.

I have an application which has a JSP page which refreshes every minute. What I would like to do is play a beep sound to inform the user that the page has reloaded itself. What's the proper way to open and run a .wav sound file to be able to play the beep sound everytime my page refreshes? I've researched for some code snippets on the net and all of them pointed to the fact that if I wanna play sound files, it should be opened and played in an applet running on a thread. What if I wanted it to be played in a JSP page? I need to embed the applet in it?

I tried running this piece of code on the main method of a test class I created the test class for testing playing sound files and I runned this class in eclipse.

Audioclip audioClip = Applet.newAudioClip(new URL("file:C:\\testsounds\\beep.wav"));;

After the main methods ended, I noticed through the debug mode in Eclipse that there are still threads running even though the main method has finished executing. I already What are those threads that are still running? Is it the thread of my delay method?
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe you should use the debug-mode of Eclipse, there you
can get more info about the threads,
you see them coming and going e.g. and more!
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic