Solved

play audio file in application

Posted on 1998-11-03
1
181 Views
Last Modified: 2010-03-30
I have written an application in Java. I want to call an audio file when an exception occurs. How do I do that?? My program uses core API only.  I tried AudioClip of java.Applet package, it works only in an applet but not in an Application. What is way to call Audio file in application??
I use 1.2jdkrc1 on Windows 95.
thanks in advance
0
Comment
Question by:hvhemant
1 Comment
 
LVL 8

Accepted Solution

by:
diakov earned 10 total points
Comment Utility
Jdk 1.2 also JavaSound interface.

This release includes the following new method in the class java.applet.Applet. This method does not require an AppletContext, and thus enables applications as well as applets to create AudioClips.

public static final AudioClip newAudioClip(URL url)

For more information go to:
http://www.javasoft.com/products/jdk/1.2/docs/

Cheers,
  Nik
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now