read file permission error for applet to access a file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sandeepk84
    New Member
    • Oct 2006
    • 97

    read file permission error for applet to access a file

    Hi all...
    I am having an applet program for playing an audio file. It runs normally...
    but when it's run from browser, its showing the filepermission error.

    java.security.A ccessControlExc eption: access denied (java.io.FilePe rmission "filename" read)

    how to solve this? i have tried all the ways...tried changing the java.policy file by adding grant permission, etc.
    also i created a java.policy.app let file in my directory where the applet is. and granted the permission. but am not getting...pleas e help me...

    thanks and regards,
    sand...
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    (J)Applets run under a so called 'SecurityManage r' which simply forbids any
    access of the filing system on the client's machine. The applet is said no to be
    'trusted'. You can 'sign' your applet to be trusted so it can access resources on
    the client's machine. Sun has a tutorial on this topic; google for it.

    kind regards,

    Jos

    Comment

    Working...