Hello everyone,
I have written the following simple program to play a local .wav file.
URL url = null;
try {
url = new URL("file:/c:/temp/sample.wav");
AudioClip clip = Applet.newAudioClip (url);
clip.play();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But when running the program, the following exception will be thrown,
Exception in thread "main" java.lang.VerifyError: java.lang.SecurityException: java.applet.AudioClip - protected system package 'java.applet'
at java.lang.Class.verify(Class.java:259)
at java.lang.Class.initialize(Class.java:315)
Does anyone know how to solve the issue?
Thanks in advance,
George