Solved

play audio file in application

Posted on 1998-11-03
1
184 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
ID: 1226892
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
simple java question 3 55
Java - Why doesn't this JFrame work 3 58
Java SE 8u111  Lot of stuff broke 11 68
null output 3 24
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

785 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