3 Replies Latest reply on Apr 5, 2010 2:42 AM by 843811

    Applet privelages lost after javascript call

      I have an applet that acts as a sound recorder (using JavaSound) and has the ability to open/save files to the user's local machine. This project calls for a basic GUI on an applet form, as well as exposed functions to allow for custom javascript GUI implementations. Now, I can deploy the hidden applet and access the exposed functions with html buttons through javascript just fine. The functions that only perform basic calculations work just fine. However, when I call a function that requires file manipulation or accesses the Java Sound functionality fails.

      The error I get is... "Exception in thread "Thread-13" java.security.AccessControlException: access denied (javax.sound.sampled.AudioPermission record)"

      I came across an old forum thread [[http://forums.sun.com/thread.jspa?forumID=63&threadID=443024]] that suggested wrapping the code in my exposed functions in a thread. I tried this, and I still got the same error message.

      My questions are, is file manipulation handled by an applet through javascript interaction possible? And if it is possible, what needs to be done to allow the applet the needed security permissions?

      My applet is compiled under JDK 1.5.0_22.


      Edited by: almightywiz on Apr 2, 2010 2:20 AM