Search code examples
javajavascriptms-accessappletsigned-applet

java.util.PropertyPermission file.encoding read for signed applet


i have an applet that is called by javascript from an html page. the applet enters the value from the page to an access database. i have signed the applet but still "(java.util.PropertyPermission file.encoding read)" error is showing..

UPDATE: Ive read that when a signed applet is accessed from javascript, it behaves as an unsigned applet. How can we rectify it?


Solution

  • You have to wrap the calls which need more privileges in AccessController.doPrivileged(...).

    Of course, first check that they are legitimate, i.e. they can't do anything bad even if called from evil JavasSript code.