This discussion is archived
4 Replies Latest reply: Oct 28, 2009 9:22 PM by 843811 RSS

Signed Applet still throws an Access/security exception

843811 Newbie
Currently Being Moderated

I Have created a Signed applet for web based audio recorder, we are getting the security warning certificate, but the problem is still the applet is throwing the same security exception:
*" access denied (javax.sound.sampled.AudioPermission record)".*

Below is the code I am using in the applet

1. TargetDataLine line = null;

2. AudioFormat format = new AudioFormat(8000.0F, 8, 1, true, true);

3. DataLine.Info info = new DataLine.Info(TargetDataLine.class, format);

4. line = (TargetDataLine) AudioSystem.getLine(info);, 10000);

The exception is throwing at line number 5.

The code used for signing the applet is :: creates a keystore database and generates the keys:

keytool -genkey -alias audiorecorder -keystore compstore -keypass secure -dname "cn=jones" -storepass audio

Sign the JAR File :: Code

jarsigner -keystore compstore -storepass audio -keypass secure -signedjar SAudioRecorder.jar Audio_recorder.jar audiorecorder

I don’t know why this is happening after signing the applet.
What could be the problem here? Can anyone explain me as why this is happening? And how do I solve this problem?