Link to home
Create AccountLog in
Avatar of dbrownell83
dbrownell83

asked on

"JMFSecurityManager" giving me problems

I'm getting this error:

java.lang.RuntimeException: No permission to write files from applets
at com.sun.media.JMFSecurityManager.checkFileSave(JMFSecurityManager.java:250)

I'm not using an applet, and im using this policy file:

grant  {
permission java.security.AllPermission;
};
grant {
permission java.io.FilePermission "C:\\myprogramdir\build\\-", "read,write,delete";
};

Does anyone know what to do?  JMFSecurityManager doesnt even exist in the javadocs or jmf docs
Avatar of sudhakar_koundinya
sudhakar_koundinya

Are you executing your application using Webstart. then it will raise the exception

Regards
Sudhakar
grant {
permission java.io.FilePermission "C:\\myprogramdir\build\\-", "read,write,delete";
};

should be

grant {
permission java.io.FilePermission "C:\\myprogramdir\\build\\-", "read,write,delete";
};
Avatar of dbrownell83

ASKER

none of the links are useful, and the extra \ didnt help :(
it is an application, not an applet, and i do not use webstart
I may want to see the code snippet where you are facing this problem. Is it possible to post that code??
And post full stack trace also

I may not be helpful this time as it is already 12.45 AM. I am going to bed. May be you get some other experts

Good Night

Best Regards
Sudhakar
yes please hold on, i am finding the exact line it fails on...
ok thanks anyway
it fails on the open:

dsink = Manager.createDataSink(ds, outML);
dsink.open();

java.lang.RuntimeException: No permission to write files from applets
      at com.sun.media.JMFSecurityManager.checkFileSave(JMFSecurityManager.java:250)
      at com.sun.media.datasink.file.Handler.open(Handler.java:219)
      at com.metronome.beacon.outbounddialer.RTPExport.createDataSink(WAVRecorder.java:370)
      at com.metronome.beacon.outbounddialer.RTPExport.doIt(WAVRecorder.java:190)
      at com.metronome.beacon.outbounddialer.WAVRecorder.run(WAVRecorder.java:116)
      at java.lang.Thread.run(Unknown Source)
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
thank you.  this is the only answer to that question on the internet.