Problem signing Applets with sound recording

I'm working on a project to have live conversation in one to many clients scenario. i have tested the code as a command line app No problem but hell let loose when i converted the code into an applet

here are the error messages i'm getting

Exception in startCapture.

java.security.AccessControlException: access denied (javax.sound.sampled.AudioPe

rmission record)

java.security.AccessControlException: access denied (javax.sound.sampled.AudioPe

rmission record)

at java.security.AccessControlContext.checkPermission(AccessControlConte

xt.java:323)

at java.security.AccessController.checkPermission(AccessController.java:

546)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

at com.sun.media.sound.JSSecurityManager.checkRecordPermission(JSSecurit

yManager.java:56)

at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDe

vice.java:412)

at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)

at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:139)

at SoundController.startCapture(SoundController.java:57)

at Client.startCapture(Client.java:28)

at GuiClient$StartTalkingButton.actionPerformed(GuiClient.java:39)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19

95)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav

a:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel

.java:377)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:232

)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL

istener.java:236)

at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2

31)

at java.awt.Component.processMouseEvent(Component.java:5999)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3240)

at java.awt.Component.processEvent(Component.java:5764)

at java.awt.Container.processEvent(Container.java:1984)

at java.awt.Component.dispatchEventImpl(Component.java:4407)

at java.awt.Container.dispatchEventImpl(Container.java:2042)

at java.awt.Component.dispatchEvent(Component.java:4237)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4248

)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3912)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3842)

at java.awt.Container.dispatchEventImpl(Container.java:2028)

at java.awt.Component.dispatchEvent(Component.java:4237)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:600)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre

ad.java:273)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.

java:183)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre

ad.java:173)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Exception when testing startCapture:access denied (javax.sound.sampled.AudioPerm

ission record)

I have created a policy file

keystore"file:/C:/Conference/susanstore","JKS";

grant codeBase"file: /C:/conference"{

permission java.security.AllPermission;

};

i've ran it still having the same error

I'll gladly appreciate if you could help me on it

[3880 byte] By [Hush_puppiea] at [2007-11-26 13:27:23]
# 1

Have you tried signing your applet?

to sign an applet , you can approach 3d parties like Thawte or you can sign them yourself.

Package your class file into a .jar, Create your own keystore, sign the jar file using this keystore.

Then you will be able to open it in a browser.

googlisticsa at 2007-7-7 20:28:25 > top of Java-index,Security,Signed Applets...