开发者

JNLP java.security.AccessControlException with TargetDataLine.open()?

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 u开发者_开发技巧sing JNLP's FileSaveService / FileOpenService ?

Frank


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜