views:

142

answers:

1

I have the following line which caused this error message run under JNLP :

java.security.AccessControlException: access denied (javax.sound.sampled.AudioPermission record)
    at java.security.AccessControlContext.checkPermission(Unknown Source)


TargetDataLine targetDataLine.open(audioFormat);

How to fix it ? Or does that mean in JNLP, we can't record sound ?

PS : I'm not running it in all-permissions mode, because it requires a 3rd party paid cert. to sign the jar before I can submit my app to Sun's Java Store. I wonder if there's any other way, like using JNLP's FileSaveService / FileOpenService ?

Frank

A: 

If you add the following to your JNLP (sibling to </infomration>, does it work?

<security>
    <all-permissions/>
</security>

By default, you do not have access outside the applet sandbox, including audio.

Eric Wendelin